public class MessageHeaders extends MimeMessage
MimeMessage.RecipientType
cachedContent, content, contentStream, dh, flags, headers, modified, saved
ATTACHMENT, INLINE
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, createMimeMessage, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getHeader, getHeader, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSubject, isMimeType, isSet, parse, removeHeader, reply, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDescription, setDescription, setDisposition, setFileName, setFlags, setFrom, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, setText, updateHeaders, updateMessageID, writeTo, writeTo
addRecipient, getFolder, getMessageNumber, getSession, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
public MessageHeaders() throws MessagingException
MessagingException
- for failurespublic MessageHeaders(InputStream is) throws MessagingException
is
- InputStreamMessagingException
- for failurespublic MessageHeaders(InternetHeaders headers) throws MessagingException
headers
- InternetHeaders to useMessagingException
- for failurespublic 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
- alwaysCopyright © 2019 Eclipse Foundation. Use is subject to license terms.