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

## com.ibm.atp
Class ContentOutputStream

    java.lang.Object
      |
      +--java.io.OutputStream
            |
            +--java.io.ByteArrayOutputStream
                  |
                  +--com.ibm.atp.ContentOutputStream

All Implemented Interfaces:
  ContentBuffer

public final class ContentOutputStream
extends java.io.ByteArrayOutputStream
implements ContentBuffer

The content output stream writes a message content to the given output stream. The content output stream creats MIME header fields, combines it with a message body, and writes it into the specifid output stream.

Version:
  1.20 3 Mar 1997
Author:
  Danny B. Lange, Gaku Yamamoto, Mitsuru Oshima

Field Summary
`protected java.io.OutputStream` | `_out` An output stream into which ATP messages is written.
`static java.lang.String` | `CRLF` A separator in the message's header.

Fields inherited from class java.io.ByteArrayOutputStream
`buf, count`

Constructor Summary
`ContentOutputStream(java.io.OutputStream os)` Create a new instance of ContentOutputStream.
`ContentOutputStream(java.io.OutputStream os, boolean started)`

Method Summary
`void` | `close()` Close the stream.
`void` | `flush()`
`void` | `sendContent()`
`void` | `startContent()`

Methods inherited from class java.io.ByteArrayOutputStream
`reset, size, toByteArray, toString, toString, toString, write, write, writeTo`

Methods inherited from class java.io.OutputStream
`write`

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

Field Detail

### CRLF

    public static final java.lang.String CRLF

  A separator in the message's header.

### _out

    protected java.io.OutputStream _out

  An output stream into which ATP messages is written. An atp output stream writes ATP messages into it.

Constructor Detail

### ContentOutputStream

    public ContentOutputStream(java.io.OutputStream os)

  Create a new instance of ContentOutputStream.
  Parameters:
    `os` - an instance of OutputStream into which the instantiated atp output stream writes.

### ContentOutputStream

    public ContentOutputStream(java.io.OutputStream os,
                               boolean started)

Method Detail

### close

    public void close()
               throws java.io.IOException

  Close the stream. This automatically flushe if the request has not been sent.
  Overrides:
    `close` in class `java.io.ByteArrayOutputStream`

### flush

    public void flush()
               throws java.io.IOException

  Overrides:
    `flush` in class `java.io.OutputStream`

### sendContent

    public void sendContent()
                     throws java.io.IOException

  Specified by:
    `sendContent` in interface `ContentBuffer`

### startContent

    public void startContent()
                      throws java.io.IOException

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