Class ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- org.wildfly.clustering.marshalling.spi.ByteBufferOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public final class ByteBufferOutputStream extends ByteArrayOutputStream
A specialized ByteArrayOutputStream that exposes the internal buffer.- Author:
- Paul Ferraro
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Constructor Description ByteBufferOutputStream()ByteBufferOutputStream(int size)ByteBufferOutputStream(OptionalInt size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuffergetBuffer()Returns the internal buffer of this output stream.-
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Constructor Detail
-
ByteBufferOutputStream
public ByteBufferOutputStream()
-
ByteBufferOutputStream
public ByteBufferOutputStream(OptionalInt size)
-
ByteBufferOutputStream
public ByteBufferOutputStream(int size)
-
-
Method Detail
-
getBuffer
public ByteBuffer getBuffer()
Returns the internal buffer of this output stream.- Returns:
- the internal byte buffer.
-
-