Class ByteBufOutputStream

java.lang.Object
java.io.OutputStream
io.netty.buffer.ByteBufOutputStream
All Implemented Interfaces:
Closeable, DataOutput, Flushable, AutoCloseable

public class ByteBufOutputStream extends OutputStream implements DataOutput
An OutputStream which writes data to a ByteBuf.

A write operation against this stream will occur at the writerIndex of its underlying buffer and the writerIndex will increase during the write operation.

This stream implements DataOutput for your convenience. The endianness of the stream is not always big endian but depends on the endianness of the underlying buffer.

See Also: