public class ByteBufferOutputStream extends OutputStream
ByteBuffer.| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
buf |
| Constructor and Description |
|---|
ByteBufferOutputStream(ByteBuffer buf) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
getByteBuffer() |
void |
write(byte[] b,
int off,
int len)
Write an array of bytes on the buffer.
|
void |
write(int b)
Write a byte on the buffer.
|
close, flush, writeprotected final ByteBuffer buf
public ByteBufferOutputStream(ByteBuffer buf)
public final ByteBuffer getByteBuffer()
public void write(int b)
throws IOException
Buffer.position() is advanced
as a side effect.write in class OutputStreamb - A byte whose value is in [-128:127].EOFException - if the buffer would overflow.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
Buffer.position()
is advanced as a side effect.write in class OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.EOFException - if the buffer would overflow.IOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.