Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.protocols.email.beans
Class BodyPart

    java.lang.Object
      oracle.ifs.protocols.email.beans.BodyPart

All Implemented Interfaces:
  java.io.Serializable, BodyPartInterface

    public class BodyPart

extends java.lang.Object
implements java.io.Serializable, BodyPartInterface

The BodyPart class is used to organize information about the body parts of an e-mail. It is used to store the data needed to retrieve and process the body part that it represents from the ContentObject that stores the whole e-mail. This class does not have a database table associated with it, but rather all instances of it relating to a given e-mail are stored in a document, that is then refered to by an Attribute of the e-mail that the BodyPart instances describe.

See Also:
  Serialized Form
(Published)

Nested Class Summary
`class` | `BodyPart.OffsetInputStream` The OffsetInputStream class is used to select a range of bytes from an RACI and deliver those and only those bytes.

Field Summary
`static java.lang.String` | `CLASS_NAME` This class name for this class.

Constructor Summary
`BodyPart()` Constructs a BodyPart object.

Method Summary
`void` | `addChild(BodyPart child)` Adds a child to this body part.
`void` | `addEncodedHeader(java.lang.String name, java.lang.String value)` Adds a header to the body part.
`void` | `addHeader(java.lang.String name, java.lang.String value)` Adds a header to the body part.
`void` | `contextIndex(boolean flag)`
`void` | `dump(java.lang.String indent)` Dumps a formatted version of the body part to stdout.
`java.io.InputStream` | `getBodyStream()` Get an InputStream containing the body of this body part.
`long` | `getByteCount()` Get the number of bytes in this body part.
`java.io.Reader` | `getCleartextBodyReader()` Get a Reader containing the decoded body of this body part.
`java.io.Reader` | `getCleartextBodyReader(RandomAccessContentInterface raci)` Get a Reader containing the decoded body of this body part.
`java.io.InputStream` | `getCleartextBodyStream()` Get an InputStream containing the decoded body of this body part.
`java.io.InputStream` | `getCleartextBodyStream(RandomAccessContentInterface raci)` Get an InputStream containing the decoded body of this body part.
`java.io.InputStream` | `getContentStream()` Get an InputStream containing this body part.
`java.lang.String` | `getContentType()` Get the MIME content type/subtype
`boolean` | `getContextIndex()`
`java.util.Dictionary` | `getEncodedHeaderDictionary()` Get a Dictionary containing the headers of this body part indexed by header name.
`java.lang.String` | `getEncoding()` Get the content transfer encoding of this body part
`java.util.Dictionary` | `getHeaderDictionary()` Get a Dictionary containing the headers of this body part indexed by header name.
`java.io.InputStream` | `getHeaderStream()` Get an InputStream containing the header of this body part.
`void` | `getIndexableReaders(java.util.Vector readerVector, RandomAccessContentInterface raci)`
`java.io.InputStream` | `getInputStream()` Get an InputStream containing this body part.
`long` | `getLineCount()` Get the number of lines in this body part.
`java.lang.String` | `getName()` Get the name of this body part.
`java.io.OutputStream` | `getOutputStream()` Throws an exception.
`PublicObjectInterface` | `getPublicObject()` Get a PublicObject representing the content of this BodyPart
`java.util.Vector` | `getSubParts()` Get a Vector containing the child body parts of this body part.
`void` | `setBodyOffset(long offset)` Store the offset in the message of the body of this BodyPart
`void` | `setByteCount(long byteCount)` Store the number of bytes in this BodyPart
`void` | `setCharset(java.lang.String charSet)` Set the character set of this body part.
`void` | `setContentSubtype(java.lang.String contentSubtype)` Store the content subtype of this body part
`void` | `setContentType(java.lang.String contentType)` Store the content type of this body part
`void` | `setEncoding(java.lang.String encoding)` Set the content transfer encoding of this body part.
`void` | `setEndOffset(long offset)` Store the offset in the message of the end of this BodyPart
`void` | `setHeaderOffset(long offset)` Store the offset in the message of the header of this BodyPart
`void` | `setLineCount(long lineCount)` Store the number of lines in this BodyPart
`void` | `setMsg(Document msg)`
`void` | `updateByteCount()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CLASS_NAME

    public static final java.lang.String CLASS_NAME

  Description copied from class: `BodyPart`
  This class name for this class. Useful for methods that take a class name argument.

  See Also:
    Constant Field Values
  (Published)

Constructor Detail

### BodyPart

    public BodyPart()

  Constructs a BodyPart object. This is used to create any subsiduary BodyPart objects in a multipart e-mail.

Method Detail

### addHeader

    public void addHeader(java.lang.String name,
                          java.lang.String value)

  Description copied from class: `BodyPart`
  Adds a header to the body part. The value of the header is decoded via ImapEncodedWord.decode().

  Parameters:
    `name` - the name of the header
    `value` - the value of the header
  (Unpublished)

### addEncodedHeader

    public void addEncodedHeader(java.lang.String name,
                                 java.lang.String value)

  Description copied from class: `BodyPart`
  Adds a header to the body part. The value of the header is the original encoded value.

  Parameters:
    `name` - the name of the header
    `value` - the value of the header is the original encoded value
  (Unpublished)

### addChild

    public void addChild(BodyPart child)

  Description copied from class: `BodyPart`
  Adds a child to this body part. Implies that this body part has a content type of multipart.

  Parameters:
    `child` - The child BodyPart to be added.
  (Published)

### setMsg

    public void setMsg(Document msg)

### setHeaderOffset

    public void setHeaderOffset(long offset)

  Description copied from class: `BodyPart`
  Store the offset in the message of the header of this BodyPart

  Parameters:
    `offset` - The offset in the message of the header of this BodyPart
  (Unpublished)

### setBodyOffset

    public void setBodyOffset(long offset)

  Description copied from class: `BodyPart`
  Store the offset in the message of the body of this BodyPart

  Parameters:
    `offset` - The offset in the message of the body of this BodyPart
  (Unpublished)

### setEndOffset

    public void setEndOffset(long offset)

  Description copied from class: `BodyPart`
  Store the offset in the message of the end of this BodyPart

  Parameters:
    `offset` - The offset in the message of the end of this BodyPart
  (Unpublished)

### setByteCount

    public void setByteCount(long byteCount)

  Description copied from class: `BodyPart`
  Store the number of bytes in this BodyPart

  Parameters:
    `byteCount` - The number of bytes in this BodyPart
  (Unpublished)

### setLineCount

    public void setLineCount(long lineCount)

  Description copied from class: `BodyPart`
  Store the number of lines in this BodyPart

  Parameters:
    `lineCount` - The number of lines in this BodyPart
  (Unpublished)

### setContentType

    public void setContentType(java.lang.String contentType)

  Description copied from class: `BodyPart`
  Store the content type of this body part

  Parameters:
    `contentType` - The MIME content type of this body part.
  (Unpublished)

### setContentSubtype

    public void setContentSubtype(java.lang.String contentSubtype)

  Description copied from class: `BodyPart`
  Store the content subtype of this body part

  Parameters:
    `contentSubtype` - The MIME content subtype of this body part.
  (Unpublished)

### setEncoding

    public void setEncoding(java.lang.String encoding)

  Description copied from class: `BodyPart`
  Set the content transfer encoding of this body part.

  Parameters:
    `encoding` -
  (Unpublished)

### setCharset

    public void setCharset(java.lang.String charSet)

  Description copied from class: `BodyPart`
  Set the character set of this body part.

  Parameters:
    `charSet` -
  (Unpublished)

### getHeaderDictionary

    public java.util.Dictionary getHeaderDictionary()

  Description copied from class: `BodyPart`
  Get a Dictionary containing the headers of this body part indexed by header name.

  Specified by:
    `getHeaderDictionary` in interface `BodyPartInterface`
  Returns:
    a Dictionary containing all the headers of this body part.
  (Published)

### getEncodedHeaderDictionary

    public java.util.Dictionary getEncodedHeaderDictionary()

  Description copied from class: `BodyPart`
  Get a Dictionary containing the headers of this body part indexed by header name. The values of the headers are the original encoded values.

  Returns:
    a Dictionary containing all the headers of this body part.
  (Unpublished)

### getLineCount

    public long getLineCount()

  Description copied from class: `BodyPart`
  Get the number of lines in this body part.

  Specified by:
    `getLineCount` in interface `BodyPartInterface`
  Returns:
    count of lines in this body part
  (Published)

### getByteCount

    public long getByteCount()

  Description copied from class: `BodyPart`
  Get the number of bytes in this body part.

  Specified by:
    `getByteCount` in interface `BodyPartInterface`
  Returns:
    count of bytes in this body part
  (Published)

### getCleartextBodyStream

    public java.io.InputStream getCleartextBodyStream(RandomAccessContentInterface raci)
                                               throws java.io.IOException,
                                                      IfsException

  Description copied from class: `BodyPart`
  Get an InputStream containing the decoded body of this body part. That is the body after having any content transfer encoding reversed.

  Returns:
    InputStream containing decoded body of body part
  Throws:
    `java.io.IOException`
    `IfsException`
  (Published)

### getCleartextBodyStream

    public java.io.InputStream getCleartextBodyStream()
                                               throws java.io.IOException,
                                                      IfsException

  Description copied from class: `BodyPart`
  Get an InputStream containing the decoded body of this body part. That is the body after having any content transfer encoding reversed.

  Specified by:
    `getCleartextBodyStream` in interface `BodyPartInterface`
  Returns:
    InputStream containing decoded body of body part
  Throws:
    `java.io.IOException`
    `IfsException`
  (Published)

### getCleartextBodyReader

    public java.io.Reader getCleartextBodyReader(RandomAccessContentInterface raci)
                                          throws java.io.IOException,
                                                 IfsException,
                                                 java.io.UnsupportedEncodingException

  Description copied from class: `BodyPart`
  Get a Reader containing the decoded body of this body part. That is the body after having any content transfer encoding reversed.

  Returns:
    Reader containing decoded body of body part
  Throws:
    `java.io.IOException`
    `IfsException`
    `java.io.UnsupportedEncodingException`
  (Published)

### getCleartextBodyReader

    public java.io.Reader getCleartextBodyReader()
                                          throws java.io.IOException,
                                                 IfsException,
                                                 java.io.UnsupportedEncodingException

  Description copied from class: `BodyPart`
  Get a Reader containing the decoded body of this body part. That is the body after having any content transfer encoding reversed.

  Returns:
    Reader containing decoded body of body part
  Throws:
    `java.io.IOException`
    `IfsException`
    `java.io.UnsupportedEncodingException`
  (Published)

### getSubParts

    public java.util.Vector getSubParts()

  Description copied from class: `BodyPart`
  Get a Vector containing the child body parts of this body part.

  Specified by:
    `getSubParts` in interface `BodyPartInterface`
  Returns:
    Vector containing the child body parts of this body part.
  (Published)

### getEncoding

    public java.lang.String getEncoding()

  Description copied from class: `BodyPart`
  Get the content transfer encoding of this body part

  Specified by:
    `getEncoding` in interface `BodyPartInterface`
  Returns:
    a String containing the content transfer encoding of this body part.
  (Published)

### getContentType

    public java.lang.String getContentType()

  Description copied from class: `BodyPart`
  Get the MIME content type/subtype

  Specified by:
    `getContentType` in interface `BodyPartInterface`
  Returns:
    a String containing the MIME content type/subtype pair.
  See Also:
    `javax.activation.DataSource#getContentType()`
  (Published)

### getBodyStream

    public java.io.InputStream getBodyStream()
                                      throws java.io.IOException,
                                             IfsException

  Description copied from class: `BodyPart`
  Get an InputStream containing the body of this body part.

  Specified by:
    `getBodyStream` in interface `BodyPartInterface`
  Returns:
    an InputStream containing the body of this body part.
  Throws:
    `java.io.IOException`
    `IfsException`
  (Published)

### updateByteCount

    public void updateByteCount()
                         throws java.io.IOException,
                                IfsException

  Throws:
    `java.io.IOException`
    `IfsException`

### getHeaderStream

    public java.io.InputStream getHeaderStream()
                                        throws java.io.IOException,
                                               IfsException

  Description copied from class: `BodyPart`
  Get an InputStream containing the header of this body part.

  Specified by:
    `getHeaderStream` in interface `BodyPartInterface`
  Returns:
    an InputStream containing the header of this body part.
  Throws:
    `java.io.IOException`
    `IfsException`
  (Published)

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Description copied from class: `BodyPart`
  Get an InputStream containing this body part. This is the same as getBodyStream, but is here for the DataSource interface.

  Returns:
    an InputStream containing this body part.
  Throws:
    `java.io.IOException`
  See Also:
    `javax.activation.DataSource#getInputStream()`
  (Published)

### getOutputStream

    public java.io.OutputStream getOutputStream()
                                         throws java.io.IOException

  Description copied from class: `BodyPart`
  Throws an exception. This is here for the DataSource interface

  Returns:
    an OutputStream to modify the body part
  Throws:
    `java.io.IOException`
  See Also:
    `javax.activation.DataSource#getOutputStream()`
  (Published)

### getName

    public java.lang.String getName()

  Description copied from class: `BodyPart`
  Get the name of this body part. This is here for the DataSource interface.

  Returns:
    a String containing the name of the body part.
  See Also:
    `javax.activation.DataSource#getName()`
  (Published)

### getContentStream

    public java.io.InputStream getContentStream()
                                         throws java.io.IOException,
                                                IfsException

  Description copied from class: `BodyPart`
  Get an InputStream containing this body part.

  Specified by:
    `getContentStream` in interface `BodyPartInterface`
  Returns:
    an InputStream containing this body part.
  Throws:
    `java.io.IOException`
    `IfsException`
  (Published)

### contextIndex

    public void contextIndex(boolean flag)

### getContextIndex

    public boolean getContextIndex()

### getPublicObject

    public PublicObjectInterface getPublicObject()
                                          throws IfsException

  Description copied from class: `BodyPart`
  Get a PublicObject representing the content of this BodyPart

  Returns:
    a PublicObject containing the content of this BodyPart
  Throws:
    `IfsException`
  (Published)

### dump

    public void dump(java.lang.String indent)
              throws java.io.IOException,
                     IfsException

  Description copied from class: `BodyPart`
  Dumps a formatted version of the body part to stdout.

  Parameters:
    `indent` - The string to print before each line of the formatted output.
  Throws:
    `java.io.IOException`
    `IfsException`
  (Unpublished)

### getIndexableReaders

    public void getIndexableReaders(java.util.Vector readerVector,
                                    RandomAccessContentInterface raci)
                             throws java.io.IOException,
                                    IfsException

  Throws:
    `java.io.IOException`
    `IfsException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD