|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.BodyPart javax.mail.internet.MimeBodyPart org.apache.geronimo.javamail.store.imap.IMAPMimeBodyPart
public class IMAPMimeBodyPart
Field Summary | |
---|---|
protected IMAPBodyStructure |
bodyStructure
|
protected IMAPMessage |
message
|
protected String |
section
|
Fields inherited from class javax.mail.internet.MimeBodyPart |
---|
content, contentStream, dh, headers |
Fields inherited from class javax.mail.BodyPart |
---|
parent |
Fields inherited from interface javax.mail.Part |
---|
ATTACHMENT, INLINE |
Constructor Summary | |
---|---|
IMAPMimeBodyPart(IMAPMessage message,
IMAPBodyStructure bodyStructure,
String section)
Create an instance of a MimeBodyPart within an IMAP message. |
Method Summary | |
---|---|
void |
addHeader(String name,
String value)
|
void |
addHeaderLine(String line)
|
Enumeration |
getAllHeaderLines()
|
Enumeration |
getAllHeaders()
|
String |
getContentID()
|
String |
getContentMD5()
|
protected InputStream |
getContentStream()
|
String |
getContentType()
Get the content type for the body part. |
DataHandler |
getDataHandler()
Create the DataHandler object for this message. |
String |
getDescription()
|
String |
getDisposition()
Retrieve the disposition information about this body part. |
String |
getEncoding()
|
String |
getFileName()
|
String[] |
getHeader(String name)
Following is a set of methods that deal with headers These methods are just overrides on the superclass methods to allow lazy loading of the header information. |
String |
getHeader(String name,
String delimiter)
|
int |
getLineCount()
Get the estimated line count for the body part. |
Enumeration |
getMatchingHeaderLines(String[] names)
|
Enumeration |
getMatchingHeaders(String[] names)
|
Enumeration |
getNonMatchingHeaderLines(String[] names)
|
Enumeration |
getNonMatchingHeaders(String[] names)
|
int |
getSize()
Get the size of the message part. |
boolean |
isMimeType(String type)
Test if the body part is of a particular MIME type. |
protected void |
loadContent()
Load the message content into the BodyPart object. |
protected void |
loadHeaders()
Load the mime part headers into this body part. |
void |
removeHeader(String name)
|
void |
setContent(Multipart mp)
|
void |
setContent(Object o,
String type)
|
void |
setContentID(String id)
|
void |
setContentMD5(String id)
|
void |
setDataHandler(DataHandler content)
|
void |
setDescription(String d,
String charset)
|
void |
setDisposition(String disposition)
Set the disposition information. |
void |
setFileName(String name)
|
void |
setHeader(String name,
String value)
|
Methods inherited from class javax.mail.internet.MimeBodyPart |
---|
attachFile, attachFile, getContent, getContentLanguage, getInputStream, getRawInputStream, saveFile, saveFile, setContentLanguage, setDescription, setText, setText, setText, updateHeaders, writeTo |
Methods inherited from class javax.mail.BodyPart |
---|
getParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IMAPMessage message
protected IMAPBodyStructure bodyStructure
protected String section
Constructor Detail |
---|
public IMAPMimeBodyPart(IMAPMessage message, IMAPBodyStructure bodyStructure, String section)
message
- The parent Message instance containing this part.bodyStructure
- The IMAPBodyStructure information describing the part.section
- The numeric section identifier string for this part.
This is a hierarchical set of numbers describing
how to navigate to the message part on the IMAP
server. For example, "2.1.3" would be the third
subpart of the first subpart of the second main
message part.Method Detail |
---|
public int getSize() throws MessagingException
getSize
in interface Part
getSize
in class MimeBodyPart
MessagingException
public int getLineCount() throws MessagingException
getLineCount
in interface Part
getLineCount
in class MimeBodyPart
MessagingException
public String getContentType() throws MessagingException
getContentType
in interface Part
getContentType
in class MimeBodyPart
MessagingException
public boolean isMimeType(String type) throws MessagingException
isMimeType
in interface Part
isMimeType
in class MimeBodyPart
type
- The string MIME-type name. A wild card * can be
specified for the subpart type.
MessagingException
public String getDisposition() throws MessagingException
getDisposition
in interface Part
getDisposition
in class MimeBodyPart
MessagingException
public void setDisposition(String disposition) throws MessagingException
setDisposition
in interface Part
setDisposition
in class MimeBodyPart
disposition
- The disposition string.
MessagingException
public String getEncoding() throws MessagingException
getEncoding
in interface MimePart
getEncoding
in class MimeBodyPart
MessagingException
public String getContentID() throws MessagingException
getContentID
in interface MimePart
getContentID
in class MimeBodyPart
MessagingException
public void setContentID(String id) throws MessagingException
setContentID
in class MimeBodyPart
MessagingException
public String getContentMD5() throws MessagingException
getContentMD5
in interface MimePart
getContentMD5
in class MimeBodyPart
MessagingException
public void setContentMD5(String id) throws MessagingException
setContentMD5
in interface MimePart
setContentMD5
in class MimeBodyPart
MessagingException
public String getDescription() throws MessagingException
getDescription
in interface Part
getDescription
in class MimeBodyPart
MessagingException
public void setDescription(String d, String charset) throws MessagingException
setDescription
in class MimeBodyPart
MessagingException
public String getFileName() throws MessagingException
getFileName
in interface Part
getFileName
in class MimeBodyPart
MessagingException
public void setFileName(String name) throws MessagingException
setFileName
in interface Part
setFileName
in class MimeBodyPart
MessagingException
protected InputStream getContentStream() throws MessagingException
getContentStream
in class MimeBodyPart
MessagingException
public DataHandler getDataHandler() throws MessagingException
getDataHandler
in interface Part
getDataHandler
in class MimeBodyPart
MessagingException
public void setDataHandler(DataHandler content) throws MessagingException
setDataHandler
in interface Part
setDataHandler
in class MimeBodyPart
MessagingException
public void setContent(Object o, String type) throws MessagingException
setContent
in interface Part
setContent
in class MimeBodyPart
MessagingException
public void setContent(Multipart mp) throws MessagingException
setContent
in interface Part
setContent
in class MimeBodyPart
MessagingException
public String[] getHeader(String name) throws MessagingException
getHeader
in interface Part
getHeader
in class MimeBodyPart
MessagingException
public String getHeader(String name, String delimiter) throws MessagingException
getHeader
in interface MimePart
getHeader
in class MimeBodyPart
MessagingException
public Enumeration getAllHeaders() throws MessagingException
getAllHeaders
in interface Part
getAllHeaders
in class MimeBodyPart
MessagingException
public Enumeration getMatchingHeaders(String[] names) throws MessagingException
getMatchingHeaders
in interface Part
getMatchingHeaders
in class MimeBodyPart
MessagingException
public Enumeration getNonMatchingHeaders(String[] names) throws MessagingException
getNonMatchingHeaders
in interface Part
getNonMatchingHeaders
in class MimeBodyPart
MessagingException
public Enumeration getAllHeaderLines() throws MessagingException
getAllHeaderLines
in interface MimePart
getAllHeaderLines
in class MimeBodyPart
MessagingException
public Enumeration getMatchingHeaderLines(String[] names) throws MessagingException
getMatchingHeaderLines
in interface MimePart
getMatchingHeaderLines
in class MimeBodyPart
MessagingException
public Enumeration getNonMatchingHeaderLines(String[] names) throws MessagingException
getNonMatchingHeaderLines
in interface MimePart
getNonMatchingHeaderLines
in class MimeBodyPart
MessagingException
public void addHeader(String name, String value) throws MessagingException
addHeader
in interface Part
addHeader
in class MimeBodyPart
MessagingException
public void setHeader(String name, String value) throws MessagingException
setHeader
in interface Part
setHeader
in class MimeBodyPart
MessagingException
public void removeHeader(String name) throws MessagingException
removeHeader
in interface Part
removeHeader
in class MimeBodyPart
MessagingException
public void addHeaderLine(String line) throws MessagingException
addHeaderLine
in interface MimePart
addHeaderLine
in class MimeBodyPart
MessagingException
protected void loadHeaders() throws MessagingException
MessagingException
protected void loadContent() throws MessagingException
MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |