public class ByteBufferDesc extends Object
| Modifier and Type | Field and Description |
|---|---|
ByteBuffer |
buffer |
| Constructor and Description |
|---|
ByteBufferDesc(boolean calculate) |
ByteBufferDesc(byte[] bytes) |
ByteBufferDesc(int size) |
| Modifier and Type | Method and Description |
|---|---|
int |
capacity() |
void |
compact() |
int |
getIntFromByte(byte b) |
int |
getPosition() |
boolean |
hasRemaining() |
int |
length() |
int |
limit() |
void |
limit(int limit) |
int |
position() |
void |
position(int position) |
void |
put(ByteBuffer buff) |
boolean |
readBool(boolean exception) |
byte[] |
readByteArray(boolean exception) |
ByteBufferDesc |
readByteBuffer(boolean exception) |
byte[] |
readData(int count,
boolean exception) |
double |
readDouble(boolean exception) |
int |
readInt32(boolean exception) |
long |
readInt64(boolean exception) |
void |
readRaw(byte[] b,
boolean exception) |
String |
readString(boolean exception) |
void |
rewind() |
void |
skip(int count) |
void |
writeBool(boolean value) |
void |
writeByte(byte b) |
void |
writeByte(int i) |
void |
writeByteArray(byte[] b) |
void |
writeByteArray(byte[] b,
int offset,
int count) |
void |
writeByteBuffer(ByteBufferDesc b) |
void |
writeDouble(double d) |
void |
writeInt32(int x) |
void |
writeInt64(long x) |
void |
writeRaw(byte[] b) |
void |
writeRaw(byte[] b,
int offset,
int count) |
void |
writeRaw(ByteBufferDesc b) |
void |
writeString(String s) |
public ByteBuffer buffer
public ByteBufferDesc(int size)
public ByteBufferDesc(boolean calculate)
public ByteBufferDesc(byte[] bytes)
public int position()
public void position(int position)
public int capacity()
public int limit()
public void limit(int limit)
public void put(ByteBuffer buff)
public void rewind()
public void compact()
public boolean hasRemaining()
public void writeInt32(int x)
public void writeInt64(long x)
public void writeBool(boolean value)
public void writeRaw(byte[] b)
public void writeRaw(byte[] b,
int offset,
int count)
public void writeByte(int i)
public void writeByte(byte b)
public void writeString(String s)
public void writeByteArray(byte[] b,
int offset,
int count)
public void writeByteArray(byte[] b)
public void writeDouble(double d)
public void writeByteBuffer(ByteBufferDesc b)
public void writeRaw(ByteBufferDesc b)
public int getIntFromByte(byte b)
public int length()
public void skip(int count)
public int getPosition()
public int readInt32(boolean exception)
public boolean readBool(boolean exception)
public long readInt64(boolean exception)
public void readRaw(byte[] b,
boolean exception)
public byte[] readData(int count,
boolean exception)
public String readString(boolean exception)
public byte[] readByteArray(boolean exception)
public ByteBufferDesc readByteBuffer(boolean exception)
public double readDouble(boolean exception)
Copyright © 2017. All rights reserved.