javax.mail.internet
Class MimeBodyPart
java.lang.Object
javax.mail.BodyPart
javax.mail.internet.MimeBodyPart
- All Implemented Interfaces:
- MimePart, Part
- public class MimeBodyPart
- extends BodyPart
- implements MimePart
- Version:
- $Revision: 1.3 $ $Date: 2004/03/10 10:00:28 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
content
protected byte[] content
contentStream
protected InputStream contentStream
dh
protected javax.activation.DataHandler dh
headers
protected InternetHeaders headers
MimeBodyPart
public MimeBodyPart()
MimeBodyPart
public MimeBodyPart(InputStream in)
throws MessagingException
MimeBodyPart
public MimeBodyPart(InternetHeaders headers,
byte[] content)
throws MessagingException
addHeader
public void addHeader(String name,
String value)
throws MessagingException
- Specified by:
addHeader
in interface Part
- Throws:
MessagingException
addHeaderLine
public void addHeaderLine(String line)
throws MessagingException
- Specified by:
addHeaderLine
in interface MimePart
- Throws:
MessagingException
getAllHeaderLines
public Enumeration getAllHeaderLines()
throws MessagingException
- Specified by:
getAllHeaderLines
in interface MimePart
- Throws:
MessagingException
getAllHeaders
public Enumeration getAllHeaders()
throws MessagingException
- Specified by:
getAllHeaders
in interface Part
- Throws:
MessagingException
getContent
public Object getContent()
throws IOException,
MessagingException
- Specified by:
getContent
in interface Part
- Throws:
IOException
MessagingException
getContentID
public String getContentID()
throws MessagingException
- Specified by:
getContentID
in interface MimePart
- Throws:
MessagingException
getContentLanguage
public String[] getContentLanguage()
throws MessagingException
- Specified by:
getContentLanguage
in interface MimePart
- Throws:
MessagingException
getContentMD5
public String getContentMD5()
throws MessagingException
- Specified by:
getContentMD5
in interface MimePart
- Throws:
MessagingException
getContentStream
protected InputStream getContentStream()
throws MessagingException
- Throws:
MessagingException
getContentType
public String getContentType()
throws MessagingException
- Specified by:
getContentType
in interface Part
- Throws:
MessagingException
getDataHandler
public javax.activation.DataHandler getDataHandler()
throws MessagingException
- Specified by:
getDataHandler
in interface Part
- Throws:
MessagingException
getDescription
public String getDescription()
throws MessagingException
- Specified by:
getDescription
in interface Part
- Throws:
MessagingException
getDisposition
public String getDisposition()
throws MessagingException
- Specified by:
getDisposition
in interface Part
- Throws:
MessagingException
getEncoding
public String getEncoding()
throws MessagingException
- Specified by:
getEncoding
in interface MimePart
- Throws:
MessagingException
getFileName
public String getFileName()
throws MessagingException
- Specified by:
getFileName
in interface Part
- Throws:
MessagingException
getHeader
public String[] getHeader(String name)
throws MessagingException
- Specified by:
getHeader
in interface Part
- Throws:
MessagingException
getHeader
public String getHeader(String name,
String delimiter)
throws MessagingException
- Specified by:
getHeader
in interface MimePart
- Throws:
MessagingException
getInputStream
public InputStream getInputStream()
throws IOException,
MessagingException
- Specified by:
getInputStream
in interface Part
- Throws:
IOException
MessagingException
getLineCount
public int getLineCount()
throws MessagingException
- Specified by:
getLineCount
in interface Part
- Throws:
MessagingException
getMatchingHeaderLines
public Enumeration getMatchingHeaderLines(String[] names)
throws MessagingException
- Specified by:
getMatchingHeaderLines
in interface MimePart
- Throws:
MessagingException
getMatchingHeaders
public Enumeration getMatchingHeaders(String[] name)
throws MessagingException
- Specified by:
getMatchingHeaders
in interface Part
- Throws:
MessagingException
getNonMatchingHeaderLines
public Enumeration getNonMatchingHeaderLines(String[] names)
throws MessagingException
- Specified by:
getNonMatchingHeaderLines
in interface MimePart
- Throws:
MessagingException
getNonMatchingHeaders
public Enumeration getNonMatchingHeaders(String[] name)
throws MessagingException
- Specified by:
getNonMatchingHeaders
in interface Part
- Throws:
MessagingException
getRawInputStream
public InputStream getRawInputStream()
throws MessagingException
- Throws:
MessagingException
getSize
public int getSize()
throws MessagingException
- Specified by:
getSize
in interface Part
- Throws:
MessagingException
isMimeType
public boolean isMimeType(String type)
throws MessagingException
- Specified by:
isMimeType
in interface Part
- Throws:
MessagingException
removeHeader
public void removeHeader(String name)
throws MessagingException
- Specified by:
removeHeader
in interface Part
- Throws:
MessagingException
setContent
public void setContent(Multipart content)
throws MessagingException
- Specified by:
setContent
in interface Part
- Throws:
MessagingException
setContent
public void setContent(Object content,
String type)
throws MessagingException
- Specified by:
setContent
in interface Part
- Throws:
MessagingException
setContentID
public void setContentID(String cid)
throws MessagingException
- Throws:
MessagingException
setContentLanguage
public void setContentLanguage(String[] languages)
throws MessagingException
- Specified by:
setContentLanguage
in interface MimePart
- Throws:
MessagingException
setContentMD5
public void setContentMD5(String md5)
throws MessagingException
- Specified by:
setContentMD5
in interface MimePart
- Throws:
MessagingException
setDataHandler
public void setDataHandler(javax.activation.DataHandler handler)
throws MessagingException
- Specified by:
setDataHandler
in interface Part
- Throws:
MessagingException
setDescription
public void setDescription(String description)
throws MessagingException
- Specified by:
setDescription
in interface Part
- Throws:
MessagingException
setDescription
public void setDescription(String description,
String charset)
throws MessagingException
- Throws:
MessagingException
setDisposition
public void setDisposition(String disposition)
throws MessagingException
- Specified by:
setDisposition
in interface Part
- Throws:
MessagingException
setFileName
public void setFileName(String name)
throws MessagingException
- Specified by:
setFileName
in interface Part
- Throws:
MessagingException
setHeader
public void setHeader(String name,
String value)
throws MessagingException
- Specified by:
setHeader
in interface Part
- Throws:
MessagingException
setText
public void setText(String text)
throws MessagingException
- Specified by:
setText
in interface MimePart
- Throws:
MessagingException
setText
public void setText(String text,
String charset)
throws MessagingException
- Specified by:
setText
in interface MimePart
- Throws:
MessagingException
updateHeaders
protected void updateHeaders()
throws MessagingException
- Throws:
MessagingException
writeTo
public void writeTo(OutputStream out)
throws IOException,
MessagingException
- Specified by:
writeTo
in interface Part
- Throws:
IOException
MessagingException
Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.