1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| package javax.mail; |
19 |
| |
20 |
| import java.io.IOException; |
21 |
| import java.io.InputStream; |
22 |
| import java.io.OutputStream; |
23 |
| import java.util.Enumeration; |
24 |
| import javax.activation.DataHandler; |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| public interface Part { |
33 |
| public static final String ATTACHMENT = "attachment"; |
34 |
| public static final String INLINE = "inline"; |
35 |
| |
36 |
| public abstract void addHeader(String name, String value) throws MessagingException; |
37 |
| |
38 |
| public abstract Enumeration getAllHeaders() throws MessagingException; |
39 |
| |
40 |
| public abstract Object getContent() throws IOException, MessagingException; |
41 |
| |
42 |
| public abstract String getContentType() throws MessagingException; |
43 |
| |
44 |
| public abstract DataHandler getDataHandler() throws MessagingException; |
45 |
| |
46 |
| public abstract String getDescription() throws MessagingException; |
47 |
| |
48 |
| public abstract String getDisposition() throws MessagingException; |
49 |
| |
50 |
| public abstract String getFileName() throws MessagingException; |
51 |
| |
52 |
| public abstract String[] getHeader(String name) throws MessagingException; |
53 |
| |
54 |
| public abstract InputStream getInputStream() throws IOException, MessagingException; |
55 |
| |
56 |
| public abstract int getLineCount() throws MessagingException; |
57 |
| |
58 |
| public abstract Enumeration getMatchingHeaders(String[] names) throws MessagingException; |
59 |
| |
60 |
| public abstract Enumeration getNonMatchingHeaders(String[] names) throws MessagingException; |
61 |
| |
62 |
| public abstract int getSize() throws MessagingException; |
63 |
| |
64 |
| public abstract boolean isMimeType(String mimeType) throws MessagingException; |
65 |
| |
66 |
| public abstract void removeHeader(String name) throws MessagingException; |
67 |
| |
68 |
| public abstract void setContent(Multipart content) throws MessagingException; |
69 |
| |
70 |
| public abstract void setContent(Object content, String type) throws MessagingException; |
71 |
| |
72 |
| public abstract void setDataHandler(DataHandler handler) throws MessagingException; |
73 |
| |
74 |
| public abstract void setDescription(String description) throws MessagingException; |
75 |
| |
76 |
| public abstract void setDisposition(String disposition) throws MessagingException; |
77 |
| |
78 |
| public abstract void setFileName(String name) throws MessagingException; |
79 |
| |
80 |
| public abstract void setHeader(String name, String value) throws MessagingException; |
81 |
| |
82 |
| public abstract void setText(String content) throws MessagingException; |
83 |
| |
84 |
| public abstract void writeTo(OutputStream out) throws IOException, MessagingException; |
85 |
| } |