public class HeapBufferDataOutputStream extends ByteArrayOutputStream
buf, count| Constructor and Description |
|---|
HeapBufferDataOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
getByteBuffer()
Returns the current
ByteBuffer mapped on the target file. |
int |
size()
Returns the current size of this stream.
|
void |
write(ByteBuffer byteBuffer)
Writes a sequence of bytes to this stream from the given buffer.
|
close, reset, size, toByteArray, toString, toString, toString, write, write, writeToflush, writepublic ByteBuffer getByteBuffer() throws IOException
ByteBuffer mapped on the target file.
Note: the ByteBuffer has READ ONLY access.
ByteBufferIOExceptionpublic void write(ByteBuffer byteBuffer) throws IOException
byteBuffer - the source ByteBufferIOExceptionpublic int size()
throws IOException
IOException