public class ByteBufferOutputStream extends OutputStream
OutputStream in
ByteBuffers.
Originally from org.apache.avro.util.ByteBufferOutputStream, moved into
Hector and added getByteBuffer to return single ByteBuffer from contents.| 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.
|
ByteBuffer |
getByteBuffer() |
void |
prepend(List<ByteBuffer> lists)
Prepend a list of ByteBuffers to this stream.
|
void |
reset() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer buffer)
Add a buffer to the output without copying, if possible.
|
void |
write(int b) |
void |
writeChar(char value) |
void |
writeDouble(double value) |
void |
writeFloat(float value) |
void |
writeInt(int value) |
void |
writeLong(long value) |
void |
writeShort(short value) |
close, flushpublic List<ByteBuffer> getBufferList()
public ByteBuffer getByteBuffer()
public void prepend(List<ByteBuffer> lists)
public void append(List<ByteBuffer> lists)
public void reset()
public void write(int b)
write in class OutputStreampublic void writeShort(short value)
public void writeChar(char value)
public void writeInt(int value)
public void writeFloat(float value)
public void writeLong(long value)
public void writeDouble(double value)
public void write(byte[] b)
write in class OutputStreampublic void write(byte[] b,
int off,
int len)
write in class OutputStreampublic void write(ByteBuffer buffer)
Copyright © 2014. All Rights Reserved.