|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.mail.BodyPart
javax.mail.internet.MimeBodyPart
org.nhindirect.stagent.mail.MimeEntity
public class MimeEntity
Container for a complete MIME entity. May consist of a complete MIME message or a MIME part of a message.
| Field Summary |
|---|
| Fields inherited from interface javax.mail.Part |
|---|
ATTACHMENT, INLINE |
| Constructor Summary | |
|---|---|
MimeEntity()
Constructs an empty MIME entity. |
|
MimeEntity(InputStream inStream)
Constructs a message from input stream containing the entire message. |
|
MimeEntity(javax.mail.internet.InternetHeaders headers,
byte[] content)
Constructs a MimeEntity with the provided headers and message body. |
|
| Method Summary | |
|---|---|
byte[] |
getContentAsBytes()
Gets the content (body) of the entity as a byte array. |
boolean |
isMultiPart()
Indicates if the entity is MIME multipart entity. |
String |
toString()
|
void |
verifyContentType(javax.mail.internet.ContentType expectedType)
Verifies if the content type of the entity is what is expected. |
void |
verifyContentType(String expectedType)
Verifies if the content type of the entity is what is expected. |
void |
verifyTransferEncoding(String expectedEncoding)
Verifies if the transfer encoding of the entity is what is expected. |
| Methods inherited from class javax.mail.internet.MimeBodyPart |
|---|
addHeader, addHeaderLine, attachFile, attachFile, getAllHeaderLines, getAllHeaders, getContent, getContentID, getContentLanguage, getContentMD5, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getSize, isMimeType, removeHeader, saveFile, saveFile, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setHeader, setText, setText, setText, writeTo |
| Methods inherited from class javax.mail.BodyPart |
|---|
getParent |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MimeEntity()
public MimeEntity(javax.mail.internet.InternetHeaders headers,
byte[] content)
throws javax.mail.MessagingException
headers - Collection of headers to apply to the message.content - The message's body.
javax.mail.MessagingException
public MimeEntity(InputStream inStream)
throws javax.mail.MessagingException
inStream - An input stream containing the entire content (headers and content) of the message.
javax.mail.MessagingException| Method Detail |
|---|
public boolean isMultiPart()
public void verifyContentType(String expectedType)
throws MimeException
expectedType - The content type of the entity that is expected.
ProtocolException - Thrown if the entity's content type does not match the expected type.
MimeException
public void verifyContentType(javax.mail.internet.ContentType expectedType)
throws MimeException
expectedType - The content type of the entity that is expected.
ProtocolException - Thrown if the entity's content type does not match the expected type.
MimeException
public void verifyTransferEncoding(String expectedEncoding)
throws MimeException
expectedEncoding - The transfer encoding of the entity that is expected.
ProtocolException - Thrown if the entity's transfer encoding does not match the expected encoding.
MimeExceptionpublic String toString()
toString in class Objectpublic byte[] getContentAsBytes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||