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, write
protected 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 OutputStream
b
- A byte whose value is in [-128:127].EOFException
- if the buffer would overflow.IOException
public void write(byte[] b, int off, int len) throws IOException
Buffer.position()
is advanced as a side effect.write
in class OutputStream
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.EOFException
- if the buffer would overflow.IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.