|
||||||||||
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
public class MimeBodyPart
Field Summary | |
---|---|
protected byte[] |
content
This message's content (unless sourced from a SharedInputStream). |
protected InputStream |
contentStream
If the data for this message was supplied by a SharedInputStream
then this is another such stream representing the content of this message;
if this field is non-null, then content will be null. |
protected DataHandler |
dh
The DataHandler for this Message's content. |
protected InternetHeaders |
headers
This message's headers. |
Fields inherited from class javax.mail.BodyPart |
---|
parent |
Fields inherited from interface javax.mail.Part |
---|
ATTACHMENT, INLINE |
Constructor Summary | |
---|---|
MimeBodyPart()
|
|
MimeBodyPart(InputStream in)
|
|
MimeBodyPart(InternetHeaders headers,
byte[] content)
|
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 DataHandler dh
DataHandler
for this Message's content.
protected byte[] content
protected InputStream contentStream
SharedInputStream
then this is another such stream representing the content of this message;
if this field is non-null, then content
will be null.
protected InternetHeaders headers
Constructor Detail |
---|
public MimeBodyPart()
public MimeBodyPart(InputStream in) throws MessagingException
MessagingException
public MimeBodyPart(InternetHeaders headers, byte[] content) throws MessagingException
MessagingException
Method Detail |
---|
public int getSize() throws MessagingException
getSize
in interface Part
MessagingException
public int getLineCount() throws MessagingException
getLineCount
in interface Part
MessagingException
public String getContentType() throws MessagingException
getContentType
in interface Part
MessagingException
public boolean isMimeType(String type) throws MessagingException
isMimeType
in interface Part
type
- The tested type name.
MessagingException
public String getDisposition() throws MessagingException
getDisposition
in interface Part
MessagingException
public void setDisposition(String disposition) throws MessagingException
setDisposition
in interface Part
disposition
- The new disposition value.
MessagingException
public String getEncoding() throws MessagingException
getEncoding
in interface MimePart
MessagingException
public String getContentID() throws MessagingException
getContentID
in interface MimePart
MessagingException
public void setContentID(String cid) throws MessagingException
MessagingException
public String getContentMD5() throws MessagingException
getContentMD5
in interface MimePart
MessagingException
public void setContentMD5(String md5) throws MessagingException
setContentMD5
in interface MimePart
MessagingException
public String[] getContentLanguage() throws MessagingException
getContentLanguage
in interface MimePart
MessagingException
public void setContentLanguage(String[] languages) throws MessagingException
setContentLanguage
in interface MimePart
MessagingException
public String getDescription() throws MessagingException
getDescription
in interface Part
MessagingException
public void setDescription(String description) throws MessagingException
setDescription
in interface Part
MessagingException
public void setDescription(String description, String charset) throws MessagingException
MessagingException
public String getFileName() throws MessagingException
getFileName
in interface Part
MessagingException
public void setFileName(String name) throws MessagingException
setFileName
in interface Part
MessagingException
public InputStream getInputStream() throws MessagingException, IOException
getInputStream
in interface Part
MessagingException
IOException
protected InputStream getContentStream() throws MessagingException
MessagingException
public InputStream getRawInputStream() throws MessagingException
MessagingException
public DataHandler getDataHandler() throws MessagingException
getDataHandler
in interface Part
MessagingException
public Object getContent() throws MessagingException, IOException
getContent
in interface Part
MessagingException
IOException
public void setDataHandler(DataHandler handler) throws MessagingException
setDataHandler
in interface Part
MessagingException
public void setContent(Object content, String type) throws MessagingException
setContent
in interface Part
MessagingException
public void setText(String text) throws MessagingException
setText
in interface MimePart
setText
in interface Part
MessagingException
public void setText(String text, String charset) throws MessagingException
setText
in interface MimePart
MessagingException
public void setContent(Multipart part) throws MessagingException
setContent
in interface Part
MessagingException
public void writeTo(OutputStream out) throws IOException, MessagingException
writeTo
in interface Part
IOException
MessagingException
public String[] getHeader(String name) throws MessagingException
getHeader
in interface Part
MessagingException
public String getHeader(String name, String delimiter) throws MessagingException
getHeader
in interface MimePart
MessagingException
public void setHeader(String name, String value) throws MessagingException
setHeader
in interface Part
MessagingException
public void addHeader(String name, String value) throws MessagingException
addHeader
in interface Part
MessagingException
public void removeHeader(String name) throws MessagingException
removeHeader
in interface Part
MessagingException
public Enumeration getAllHeaders() throws MessagingException
getAllHeaders
in interface Part
MessagingException
public Enumeration getMatchingHeaders(String[] name) throws MessagingException
getMatchingHeaders
in interface Part
MessagingException
public Enumeration getNonMatchingHeaders(String[] name) throws MessagingException
getNonMatchingHeaders
in interface Part
MessagingException
public void addHeaderLine(String line) throws MessagingException
addHeaderLine
in interface MimePart
MessagingException
public Enumeration getAllHeaderLines() throws MessagingException
getAllHeaderLines
in interface MimePart
MessagingException
public Enumeration getMatchingHeaderLines(String[] names) throws MessagingException
getMatchingHeaderLines
in interface MimePart
MessagingException
public Enumeration getNonMatchingHeaderLines(String[] names) throws MessagingException
getNonMatchingHeaderLines
in interface MimePart
MessagingException
protected void updateHeaders() throws MessagingException
MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |