|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.Message javax.mail.internet.MimeMessage com.sun.mail.dsn.MessageHeaders
public class MessageHeaders
A special MimeMessage object that contains only message headers, no content. Used to represent the MIME type text/rfc822-headers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage |
---|
MimeMessage.RecipientType |
Field Summary |
---|
Fields inherited from class javax.mail.internet.MimeMessage |
---|
content, contentStream, dh, flags, headers, modified, saved |
Fields inherited from class javax.mail.Message |
---|
expunged, folder, msgnum, session |
Fields inherited from interface javax.mail.Part |
---|
ATTACHMENT, INLINE |
Constructor Summary | |
---|---|
MessageHeaders()
Construct a MessageHeaders object. |
|
MessageHeaders(InputStream is)
Constructs a MessageHeaders object from the given InputStream. |
|
MessageHeaders(InternetHeaders headers)
Constructs a MessageHeaders object using the given InternetHeaders. |
Method Summary | |
---|---|
protected InputStream |
getContentStream()
Produce the raw bytes of the content. |
InputStream |
getInputStream()
Return a decoded input stream for this Message's "content". |
int |
getSize()
Return the size of this message. |
void |
setDataHandler(DataHandler dh)
Can't set any content for a MessageHeaders object. |
Methods inherited from class javax.mail.Message |
---|
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageHeaders() throws MessagingException
MessagingException
public MessageHeaders(InputStream is) throws MessagingException
is
- InputStream
MessagingException
public MessageHeaders(InternetHeaders headers) throws MessagingException
headers
- InternetHeaders to use
MessagingException
Method Detail |
---|
public int getSize()
getSize
in interface Part
getSize
in class MimeMessage
public InputStream getInputStream()
MimeMessage
This implementation obtains the input stream from the DataHandler,
that is, it invokes getDataHandler().getInputStream()
.
getInputStream
in interface Part
getInputStream
in class MimeMessage
MimeMessage.getContentStream()
,
DataHandler.getInputStream()
protected InputStream getContentStream()
MimeMessage
This implementation returns a SharedInputStream, if
contentStream
is not null. Otherwise, it
returns a ByteArrayInputStream constructed
out of the content
byte array.
getContentStream
in class MimeMessage
MimeMessage.content
public void setDataHandler(DataHandler dh) throws MessagingException
setDataHandler
in interface Part
setDataHandler
in class MimeMessage
dh
- The DataHandler for the content.
MessagingException
- always
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |