public class ByteBufferOutputStream extends OutputStream
OutputStream in
 ByteBuffers.| 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, writepublic 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 OutputStreampublic void write(byte[] b,
                  int off,
                  int len)
write in class OutputStreampublic void writeBuffer(ByteBuffer buffer) throws IOException
IOExceptionCopyright © 2009–2020 The Apache Software Foundation. All rights reserved.