com.sun.mail.imap
Class IMAPBodyPart

java.lang.Object
  extended by MimeBodyPart
      extended by com.sun.mail.imap.IMAPBodyPart

public class IMAPBodyPart
extends MimeBodyPart

An IMAP body part.

Author:
John Mani, Bill Shannon

Constructor Summary
protected IMAPBodyPart(BODYSTRUCTURE bs, String sid, IMAPMessage 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()
           
 DataHandler getDataHandler()
           
 String getDescription()
           
 String getDisposition()
           
 String getEncoding()
           
 String getFileName()
           
 String[] getHeader(String name)
           
 int getLineCount()
           
 Enumeration getMatchingHeaderLines(String[] names)
           
 Enumeration getMatchingHeaders(String[] names)
           
 InputStream getMimeStream()
          Return the MIME format stream corresponding to this message part.
 Enumeration getNonMatchingHeaderLines(String[] names)
           
 Enumeration getNonMatchingHeaders(String[] names)
           
 int getSize()
           
 void removeHeader(String name)
           
 void setContent(Multipart mp)
           
 void setContent(Object o, String type)
           
 void setContentMD5(String md5)
           
 void setDataHandler(DataHandler content)
           
 void setDescription(String description, String charset)
           
 void setDisposition(String disposition)
           
 void setFileName(String filename)
           
 void setHeader(String name, String value)
           
protected  void updateHeaders()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMAPBodyPart

protected IMAPBodyPart(BODYSTRUCTURE bs,
                       String sid,
                       IMAPMessage message)
Method Detail

updateHeaders

protected void updateHeaders()

getSize

public int getSize()
            throws MessagingException
Throws:
MessagingException

getLineCount

public int getLineCount()
                 throws MessagingException
Throws:
MessagingException

getContentType

public String getContentType()
                      throws MessagingException
Throws:
MessagingException

getDisposition

public String getDisposition()
                      throws MessagingException
Throws:
MessagingException

setDisposition

public void setDisposition(String disposition)
                    throws MessagingException
Throws:
MessagingException

getEncoding

public String getEncoding()
                   throws MessagingException
Throws:
MessagingException

getContentID

public String getContentID()
                    throws MessagingException
Throws:
MessagingException

getContentMD5

public String getContentMD5()
                     throws MessagingException
Throws:
MessagingException

setContentMD5

public void setContentMD5(String md5)
                   throws MessagingException
Throws:
MessagingException

getDescription

public String getDescription()
                      throws MessagingException
Throws:
MessagingException

setDescription

public void setDescription(String description,
                           String charset)
                    throws MessagingException
Throws:
MessagingException

getFileName

public String getFileName()
                   throws MessagingException
Throws:
MessagingException

setFileName

public void setFileName(String filename)
                 throws MessagingException
Throws:
MessagingException

getContentStream

protected InputStream getContentStream()
                                throws MessagingException
Throws:
MessagingException

getMimeStream

public InputStream getMimeStream()
                          throws MessagingException
Return the MIME format stream corresponding to this message part.

Returns:
the MIME format stream
Throws:
MessagingException
Since:
JavaMail 1.4.5

getDataHandler

public DataHandler getDataHandler()
                           throws MessagingException
Throws:
MessagingException

setDataHandler

public void setDataHandler(DataHandler content)
                    throws MessagingException
Throws:
MessagingException

setContent

public void setContent(Object o,
                       String type)
                throws MessagingException
Throws:
MessagingException

setContent

public void setContent(Multipart mp)
                throws MessagingException
Throws:
MessagingException

getHeader

public String[] getHeader(String name)
                   throws MessagingException
Throws:
MessagingException

setHeader

public void setHeader(String name,
                      String value)
               throws MessagingException
Throws:
MessagingException

addHeader

public void addHeader(String name,
                      String value)
               throws MessagingException
Throws:
MessagingException

removeHeader

public void removeHeader(String name)
                  throws MessagingException
Throws:
MessagingException

getAllHeaders

public Enumeration getAllHeaders()
                          throws MessagingException
Throws:
MessagingException

getMatchingHeaders

public Enumeration getMatchingHeaders(String[] names)
                               throws MessagingException
Throws:
MessagingException

getNonMatchingHeaders

public Enumeration getNonMatchingHeaders(String[] names)
                                  throws MessagingException
Throws:
MessagingException

addHeaderLine

public void addHeaderLine(String line)
                   throws MessagingException
Throws:
MessagingException

getAllHeaderLines

public Enumeration getAllHeaderLines()
                              throws MessagingException
Throws:
MessagingException

getMatchingHeaderLines

public Enumeration getMatchingHeaderLines(String[] names)
                                   throws MessagingException
Throws:
MessagingException

getNonMatchingHeaderLines

public Enumeration getNonMatchingHeaderLines(String[] names)
                                      throws MessagingException
Throws:
MessagingException


Copyright © 2012 Oracle. All Rights Reserved.