public abstract class Buffer extends Object
Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
buffer |
Constructor and Description |
---|
Buffer() |
Modifier and Type | Method and Description |
---|---|
static Buffer |
allocate(int size,
boolean onHeapAllocation) |
void |
clear() |
abstract void |
free() |
byte |
get(int index) |
org.apache.thrift.transport.TTransport |
getInputTransport() |
int |
getInt(int atIndex) |
void |
put(int index,
byte value) |
int |
readFrom(org.apache.thrift.transport.TNonblockingTransport transport) |
abstract void |
reallocate(int newSize) |
int |
remaining()
Buffers should only be accessed by absolute positions,
this method is for convenience when buffer is passed to TTransport implementation
|
protected void |
setBuffer(ByteBuffer newBuffer) |
protected void |
setBuffer(ByteBuffer newBuffer,
ByteOrder order) |
int |
size() |
int |
writeTo(org.apache.thrift.transport.TNonblockingTransport transport,
int start,
int count) |
protected ByteBuffer buffer
public static Buffer allocate(int size, boolean onHeapAllocation)
protected void setBuffer(ByteBuffer newBuffer)
protected void setBuffer(ByteBuffer newBuffer, ByteOrder order)
public void clear()
public int getInt(int atIndex)
public byte get(int index)
public void put(int index, byte value)
public int remaining()
public int size()
public abstract void reallocate(int newSize)
public abstract void free()
public org.apache.thrift.transport.TTransport getInputTransport()
public int readFrom(org.apache.thrift.transport.TNonblockingTransport transport) throws IOException
IOException
public int writeTo(org.apache.thrift.transport.TNonblockingTransport transport, int start, int count) throws IOException
IOException
Copyright © 2013–2017. All rights reserved.