KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > alt > javax > mail > internet > MimeMessageImpl


1 package alt.javax.mail.internet;
2
3 import alt.javax.mail.Message;
4 import alt.javax.mail.MessageImpl;
5 import alt.javax.mail.Session;
6
7 import javax.mail.Address JavaDoc;
8 import javax.mail.Flags JavaDoc;
9 import javax.mail.Folder JavaDoc;
10 import javax.mail.MessagingException JavaDoc;
11 import javax.mail.search.SearchTerm JavaDoc;
12 import java.io.IOException JavaDoc;
13 import java.io.InputStream JavaDoc;
14 import java.io.OutputStream JavaDoc;
15 import java.util.Enumeration JavaDoc;
16
17
18 public class MimeMessageImpl extends MessageImpl implements MimeMessage {
19     private final javax.mail.internet.MimeMessage JavaDoc message;
20
21     public MimeMessageImpl(Session session) {
22         super(new javax.mail.internet.MimeMessage JavaDoc(session.getWrappedSession()));
23         message = (javax.mail.internet.MimeMessage JavaDoc)getRealMessage();
24     }
25
26     public void setRecipient(javax.mail.Message.RecipientType type, Address JavaDoc address) throws MessagingException JavaDoc {
27         message.setRecipient(type, address);
28     }
29
30     public void addRecipient(javax.mail.Message.RecipientType type, Address JavaDoc address) throws MessagingException JavaDoc {
31         message.addRecipient(type, address);
32     }
33
34     public void setFlag(Flags.Flag JavaDoc flag, boolean b) throws MessagingException JavaDoc {
35         message.setFlag(flag, b);
36     }
37
38     public int getMessageNumber() {
39         return message.getMessageNumber();
40     }
41
42     public Folder JavaDoc getFolder() {
43         return message.getFolder();
44     }
45
46     public boolean isExpunged() {
47         return message.isExpunged();
48     }
49
50     public boolean match(SearchTerm JavaDoc term) throws MessagingException JavaDoc {
51         return message.match(term);
52     }
53
54     public Address JavaDoc[] getAllRecipients() throws MessagingException JavaDoc {
55         return message.getAllRecipients();
56     }
57
58     public void setRecipients(javax.mail.Message.RecipientType type, String JavaDoc s) throws MessagingException JavaDoc {
59         message.setRecipients(type, s);
60     }
61
62     public void addRecipients(javax.mail.Message.RecipientType type, String JavaDoc s) throws MessagingException JavaDoc {
63         message.addRecipients(type, s);
64     }
65
66     public Address JavaDoc[] getReplyTo() throws MessagingException JavaDoc {
67         return message.getReplyTo();
68     }
69
70     public void setReplyTo(Address JavaDoc[] addresses) throws MessagingException JavaDoc {
71         message.setReplyTo(addresses);
72     }
73
74     public void setSubject(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
75         message.setSubject(s, s1);
76     }
77
78     public String JavaDoc getEncoding() throws MessagingException JavaDoc {
79         return message.getEncoding();
80     }
81
82     public String JavaDoc getContentID() throws MessagingException JavaDoc {
83         return message.getContentID();
84     }
85
86     public void setContentID(String JavaDoc s) throws MessagingException JavaDoc {
87         message.setContentID(s);
88     }
89
90     public String JavaDoc getContentMD5() throws MessagingException JavaDoc {
91         return message.getContentMD5();
92     }
93
94     public void setContentMD5(String JavaDoc s) throws MessagingException JavaDoc {
95         message.setContentMD5(s);
96     }
97
98     public void setDescription(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
99         message.setDescription(s, s1);
100     }
101
102     public String JavaDoc[] getContentLanguage() throws MessagingException JavaDoc {
103         return message.getContentLanguage();
104     }
105
106     public void setContentLanguage(String JavaDoc[] strings) throws MessagingException JavaDoc {
107         message.setContentLanguage(strings);
108     }
109
110     public String JavaDoc getMessageID() throws MessagingException JavaDoc {
111         return message.getMessageID();
112     }
113
114     public InputStream JavaDoc getRawInputStream() throws MessagingException JavaDoc {
115         return message.getRawInputStream();
116     }
117
118     public void setText(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
119         message.setText(s, s1);
120     }
121
122     public void writeTo(OutputStream JavaDoc stream, String JavaDoc[] strings) throws IOException JavaDoc, MessagingException JavaDoc {
123         message.writeTo(stream, strings);
124     }
125
126     public String JavaDoc getHeader(String JavaDoc s, String JavaDoc s1) throws MessagingException JavaDoc {
127         return message.getHeader(s, s1);
128     }
129
130     public void addHeaderLine(String JavaDoc s) throws MessagingException JavaDoc {
131         message.addHeaderLine(s);
132     }
133
134     public Enumeration JavaDoc getAllHeaderLines() throws MessagingException JavaDoc {
135         return message.getAllHeaderLines();
136     }
137
138     public Enumeration JavaDoc getMatchingHeaderLines(String JavaDoc[] strings) throws MessagingException JavaDoc {
139         return message.getMatchingHeaderLines(strings);
140     }
141
142     public Enumeration JavaDoc getNonMatchingHeaderLines(String JavaDoc[] strings) throws MessagingException JavaDoc {
143         return message.getNonMatchingHeaderLines(strings);
144     }
145
146     public synchronized boolean isSet(Flags.Flag JavaDoc flag) throws MessagingException JavaDoc {
147         return message.isSet(flag);
148     }
149 }
150
Popular Tags