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

## com.vordel.mime
Class RawBody

    java.lang.Object
      com.vordel.mime.Body
          com.vordel.mime.RawBody

All Implemented Interfaces:
  com.vordel.system.Disposable

    public class RawBody

extends Body

The fallback bodypart type for otherwise unknown MIME types.

This class is a pure implementation of Body, and does not provide any class specific operations.

Field Summary

Fields inherited from class com.vordel.mime.Body
`CAN_INVALIDATE, contentType, CT_APP_OCTET_STREAM, CT_DEFAULT, CT_MULTIPART_RELATED, CT_TEXT_PLAIN, CT_TEXT_XML_UTF8, CT_XOP_APPLICATION_XML, headers, PUSH_WRITE, REMOVE_XFER_ENCODING_ON_WRITE, RETAIN_XFER_ENCODING_ON_READ`

Constructor Summary
`RawBody(HeaderSet headers, ContentType contentType)`

Method Summary
`boolean` | `contentAvailable()`
`long` | `getContentLength(int flags)` Return the Content length of the body.
`void` | `parse(java.io.InputStream is)` Parse a body from a specific InputStream.
`void` | `purgeContent()` Bodies are purged() when they are no longer in use.
`void` | `writeContent(java.io.OutputStream ios, int flags)` Write the content of the body to the specified OutputStream This is similar to `Body.write(java.io.OutputStream, int)`, but does not include the headers for the body.

Methods inherited from class com.vordel.mime.Body
`bufferInput, create, dispose, fini, getContentEncoding, getContentId, getContentType, getHeaders, getInputStream, getParent, getSource, initSource, parse, registerFactory, setParent, write`

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

Constructor Detail

### RawBody

    public RawBody(HeaderSet headers,
                   ContentType contentType)

Method Detail

### getContentLength

    public long getContentLength(int flags)
                          throws java.io.IOException

  Description copied from class: `Body`
  Return the Content length of the body. Note that this may be expensive: unless the subclass specifically implements it, it is implemented by serialising the body.

  Note that as the flags sent to the `Body.write(java.io.OutputStream, int)` method may affect the output, this method must be passed the same flags.

  Overrides:
    `getContentLength` in class `Body`
  Throws:
    `java.io.IOException`

### contentAvailable

    public boolean contentAvailable()

  Specified by:
    `contentAvailable` in class `Body`

### parse

    public void parse(java.io.InputStream is)
               throws java.io.IOException

  Description copied from class: `Body`
  Parse a body from a specific InputStream.

  This should be considered "private" to callers: it must be invoked via `Body.parse()`

  Specified by:
    `parse` in class `Body`
  Throws:
    `java.io.IOException`
  See Also:
    `Body.parse()`

### writeContent

    public void writeContent(java.io.OutputStream ios,
                             int flags)
                      throws java.io.IOException

  Description copied from class: `Body`
  Write the content of the body to the specified OutputStream This is similar to `Body.write(java.io.OutputStream, int)`, but does not include the headers for the body.

  Specified by:
    `writeContent` in class `Body`
  Throws:
    `java.io.IOException`
  See Also:
    `#wrote`

### purgeContent

    public void purgeContent()

  Description copied from class: `Body`
  Bodies are purged() when they are no longer in use. This provides similar functionality to the "finalize()" method, but may be called by any caller, or in any thread, when it is known that a body is no longer in use.

  Specified by:
    `purgeContent` in class `Body`

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

This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel