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, writeTo
flush, write
public ByteBuffer getByteBuffer() throws IOException
ByteBuffer
mapped on the target file.
Note: the ByteBuffer
has READ ONLY access.
ByteBuffer
IOException
public void write(ByteBuffer byteBuffer) throws IOException
byteBuffer
- the source ByteBuffer
IOException
public int size() throws IOException
IOException
Copyright © 2012. All Rights Reserved.