public class ByteBufferReadable extends Object implements IBinaryReadable
ByteBufferReadable class.
| Constructor and Description |
|---|
ByteBufferReadable(byte[] buf)
Constructor for ByteBufferReadable.
|
ByteBufferReadable(ByteBuffer buf)
Constructor for ByteBufferReadable.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
get()
get.
|
void |
get(byte[] dst)
get.
|
void |
get(byte[] dst,
int offset,
int length)
get.
|
void |
get(ByteBuffer buf)
Get buf fully
|
void |
get(ByteBuffer buf,
int length)
Get fully length bytes
|
double |
getDouble()
getDouble.
|
float |
getFloat()
getFloat.
|
int |
getInt()
getInt.
|
long |
getLong()
getLong.
|
short |
getShort()
getShort.
|
long |
limit()
limit.
|
ByteOrder |
order()
order.
|
void |
order(ByteOrder order)
order.
|
long |
position()
position.
|
void |
position(int newPosition)
position.
|
void |
position(long newPosition)
position.
|
void |
skip(long bytes)
skip.
|
public ByteBufferReadable(byte[] buf)
Constructor for ByteBufferReadable.
buf - an array of byte.public ByteBufferReadable(ByteBuffer buf)
Constructor for ByteBufferReadable.
buf - a ByteBuffer object.public byte get()
IBinaryReadableget.
get in interface IBinaryReadablepublic void get(byte[] dst)
IBinaryReadableget.
get in interface IBinaryReadabledst - an array of byte.public void get(byte[] dst,
int offset,
int length)
IBinaryReadableget.
get in interface IBinaryReadabledst - an array of byte.offset - a int.length - a int.public void get(ByteBuffer buf)
IBinaryReadableget in interface IBinaryReadablebuf - a ByteBuffer object.public void get(ByteBuffer buf, int length)
IBinaryReadableget in interface IBinaryReadablebuf - a ByteBuffer object.length - a int.public double getDouble()
IBinaryReadablegetDouble.
getDouble in interface IBinaryReadablepublic float getFloat()
IBinaryReadablegetFloat.
getFloat in interface IBinaryReadablepublic int getInt()
IBinaryReadablegetInt.
getInt in interface IBinaryReadablepublic long getLong()
IBinaryReadablegetLong.
getLong in interface IBinaryReadablepublic short getShort()
IBinaryReadablegetShort.
getShort in interface IBinaryReadablepublic long limit()
IBinaryReadablelimit.
limit in interface IBinaryReadablepublic ByteOrder order()
order.
order in interface IBinaryReadableByteOrder object.public void order(ByteOrder order)
IBinaryReadableorder.
order in interface IBinaryReadableorder - a ByteOrder object.public long position()
IBinaryReadableposition.
position in interface IBinaryReadablepublic void position(int newPosition)
throws IOException
position.
newPosition - a int.IOException - if any.public void position(long newPosition)
throws IOException
position.
newPosition - a long.IOException - if any.public void skip(long bytes)
throws IOException
skip.
bytes - a long.IOException - if any.Copyright © 2026. All rights reserved.