org.apache.geronimo.javamail.store.imap.connection
Class IMAPBody

java.lang.Object
  extended by org.apache.geronimo.javamail.store.imap.connection.IMAPFetchDataItem
      extended by org.apache.geronimo.javamail.store.imap.connection.IMAPFetchBodyPart
          extended by org.apache.geronimo.javamail.store.imap.connection.IMAPBody

public class IMAPBody
extends IMAPFetchBodyPart

The full body content of a message.


Field Summary
 
Fields inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPFetchBodyPart
section
 
Fields inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPFetchDataItem
BODY, BODYSTRUCTURE, ENVELOPE, FETCH, FLAGS, HEADER, INTERNALDATE, SIZE, TEXT, type, UID
 
Constructor Summary
IMAPBody(byte[] data)
          Construct a top-level MessageText data item.
IMAPBody(IMAPBodySection section, byte[] data)
          Create a Message Text instance.
 
Method Summary
 byte[] getContent()
          Get the part content as a byte array.
 InputStream getInputStream()
          Get an input stream for reading the part content.
 
Methods inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPFetchBodyPart
getPartNumber, getSectionType, getSubstringLength, getSubstringStart
 
Methods inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPFetchDataItem
getType, isType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMAPBody

public IMAPBody(byte[] data)
         throws MessagingException
Construct a top-level MessageText data item.

Parameters:
data - The data for the Message Text
Throws:
MessagingException

IMAPBody

public IMAPBody(IMAPBodySection section,
                byte[] data)
         throws MessagingException
Create a Message Text instance.

Parameters:
section - The section information. This may include substring information if this was just a partical fetch.
data - The message content data.
Throws:
MessagingException
Method Detail

getContent

public byte[] getContent()
Get the part content as a byte array.

Returns:
The part content as a byte array.

getInputStream

public InputStream getInputStream()
Get an input stream for reading the part content.

Returns:
An ByteArrayInputStream sourced to the part content.


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.