public class ByteBufferBackedOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
protected List<ByteBuffer> |
buffers |
protected int |
initialBuffCapacity |
protected ByteBuffer |
lastBuff |
protected static int |
MIN_CAPACITY |
protected int |
written |
Constructor and Description |
---|
ByteBufferBackedOutputStream(int initialBuffCapacity) |
ByteBufferBackedOutputStream(int initialBuffCapacity,
boolean allocateDirect) |
Modifier and Type | Method and Description |
---|---|
protected ByteBuffer |
allocateBuff(int capacity) |
protected void |
allocateNextBuff() |
ByteBuffer |
asByteBuffer() |
com.google.protobuf.ByteString |
asByteString() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
int |
writtenBytes() |
close, flush, write
protected static final int MIN_CAPACITY
protected final int initialBuffCapacity
protected ByteBuffer lastBuff
protected final List<ByteBuffer> buffers
protected int written
public ByteBufferBackedOutputStream(int initialBuffCapacity)
public ByteBufferBackedOutputStream(int initialBuffCapacity, boolean allocateDirect)
protected ByteBuffer allocateBuff(int capacity)
protected void allocateNextBuff()
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public ByteBuffer asByteBuffer()
public int writtenBytes()
public com.google.protobuf.ByteString asByteString()
Copyright © 2014 AVAST Software. All Rights Reserved.