public class ByteBufferArrayReadable extends Object implements IBinaryReadable
IBinaryReadable implementation that uses an array of ByteBuffers.| Constructor and Description |
|---|
ByteBufferArrayReadable(ByteBuffer[] bufs)
Creates new
ByteBufferArrayReadable using the given buffers as data. |
| 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)
Deprecated.
|
long |
position()
position.
|
long |
remaining() |
public ByteBufferArrayReadable(ByteBuffer[] bufs)
ByteBufferArrayReadable using the given buffers as data. Note that the
given ByteBuffers shall be ByteOrder.LITTLE_ENDIAN, otherwise this throws
IllegalArgumentException. Additionally they shall not be modified while methods of this
class are called.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()
IBinaryReadableorder.
order in interface IBinaryReadableByteOrder object.@Deprecated public void order(ByteOrder order)
IBinaryReadableorder.
order in interface IBinaryReadableorder - a ByteOrder object.public long position()
IBinaryReadableposition.
position in interface IBinaryReadablepublic long remaining()
Copyright © 2026. All rights reserved.