org.apache.mina.util

## Class ByteBufferOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.mina.util.ByteBufferOutputStream

All Implemented Interfaces:
  Closeable, Flushable, AutoCloseable

    public class ByteBufferOutputStream
    extends OutputStream

`OutputStream` wrapper for `ByteBuffer`

Currently this class is only used and available in MINA's codec module

Author:
  Apache MINA Project

### Constructor Summary

Constructors
Constructor and Description
`ByteBufferOutputStream()`
`ByteBufferOutputStream(int initialSize)`

### Method Summary

Methods
`ByteBuffer` `getByteBuffer()`
`boolean` `isElastic()`
`void` `setElastic(boolean elastic)`
`void` `write(byte[] b, int off, int len)`
`void` `write(int b)`

### Methods inherited from class java.io.OutputStream

`close, flush, write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ByteBufferOutputStream

    public ByteBufferOutputStream()

#### ByteBufferOutputStream

    public ByteBufferOutputStream(int initialSize)

### Method Detail

#### getByteBuffer

    public ByteBuffer getByteBuffer()

#### isElastic

    public boolean isElastic()

#### setElastic

    public void setElastic(boolean elastic)

#### write

    public void write(byte[] b,
             int off,
             int len)

Overrides:
  `write` in class `OutputStream`

#### write

    public void write(int b)

Specified by:
  `write` in class `OutputStream`