public class ByteBufferOutputStream extends OutputStream
OutputStream
in ByteBuffer
s.Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE |
Constructor and Description |
---|
ByteBufferOutputStream() |
Modifier and Type | Method and Description |
---|---|
void |
append(List<ByteBuffer> lists)
Append a list of ByteBuffers to this stream.
|
List<ByteBuffer> |
getBufferList()
Returns all data written and resets the stream to be empty.
|
void |
prepend(List<ByteBuffer> lists)
Prepend a list of ByteBuffers to this stream.
|
void |
reset() |
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer buffer) |
void |
write(int b) |
void |
writeBuffer(ByteBuffer buffer)
Add a buffer to the output without copying, if possible.
|
close, flush, write
public static final int BUFFER_SIZE
public List<ByteBuffer> getBufferList()
public void prepend(List<ByteBuffer> lists)
public void append(List<ByteBuffer> lists)
public void reset()
public void write(ByteBuffer buffer)
public void write(int b)
write
in class OutputStream
public void write(byte[] b, int off, int len)
write
in class OutputStream
public void writeBuffer(ByteBuffer buffer) throws IOException
IOException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.