Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.mail
Class Body

    java.lang.Object
      |
      +--com.compoze.mail.Body

All Implemented Interfaces:
  java.io.Serializable

public class Body
extends java.lang.Object
implements java.io.Serializable

This class represents a text body. The body contains String text and a content type. The content type can be used to determine how to display the String text. For example, the content type might be an HTML MIME type and therefore, the body should be displayed as HTML.

See Also:
  Serialized Form

Constructor Summary
`Body()` Constructor.
`Body(java.lang.String sBody)` Constructor.
`Body(java.lang.String sContentType, java.lang.String sBody)` Constructor.

Method Summary
`int` | `compareTo(java.lang.Object o)` Compares this object with the specified object for order.
`java.lang.String` | `getContentType()` Returns the MIME type of the body.
`java.lang.String` | `getText()` Gets the plain-text representation of the body.
`java.lang.String` | `toString()` Returns the string representation of this object.

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

Constructor Detail

### Body

    public Body()

  Constructor.
  Parameters:
    `sBody` - the plain-text body

### Body

    public Body(java.lang.String sBody)

  Constructor.
  Parameters:
    `sBody` - the plain-text body

### Body

    public Body(java.lang.String sContentType,
                java.lang.String sBody)

  Constructor.
  Parameters:
    `sContentType` - the body MIME type (must be valid MIME type)
    `sBody` - the plain-text body

Method Detail

### getContentType

    public java.lang.String getContentType()

  Returns the MIME type of the body.
  Returns:
    the body MIME type

### getText

    public java.lang.String getText()

  Gets the plain-text representation of the body. Use `getContentType()` to determine display.
  Returns:
    the plain-text body or `null` for no body

### compareTo

    public int compareTo(java.lang.Object o)

  Compares this object with the specified object for order.
  Parameters:
    `o` - the object to be compared
  Returns:
    a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
  Throws:
    `ClassCastException` - if the specified object's type prevents it from being compared to this Object

### toString

    public java.lang.String toString()

  Returns the string representation of this object.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the string representation of this object

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.