public class BinaryByteBufferInputStream extends Object implements BinaryInputStream
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
byte[] |
arrayCopy() |
int |
capacity() |
static BinaryByteBufferInputStream |
create(ByteBuffer buf) |
boolean |
hasArray() |
long |
offheapPointer() |
int |
position() |
void |
position(int pos) |
long |
rawOffheapPointer() |
int |
read(byte[] arr,
int off,
int cnt)
Reads
cnt of bytes into byte array. |
boolean |
readBoolean()
Read boolean value.
|
boolean[] |
readBooleanArray(int cnt)
Read boolean array.
|
byte |
readByte()
Read byte value.
|
byte[] |
readByteArray(int cnt)
Read byte array.
|
byte |
readBytePositioned(int pos)
Read byte at the given position.
|
char |
readChar()
Read char value.
|
char[] |
readCharArray(int cnt)
Read char array.
|
double |
readDouble()
Read double value.
|
double[] |
readDoubleArray(int cnt)
Read double array.
|
float |
readFloat()
Read float value.
|
float[] |
readFloatArray(int cnt)
Read float array.
|
int |
readInt()
Read int value.
|
int[] |
readIntArray(int cnt)
Read int array.
|
int |
readIntPositioned(int pos)
Read integer at the given position.
|
long |
readLong()
Read long value.
|
long[] |
readLongArray(int cnt)
Read long array.
|
short |
readShort()
Read short value.
|
short[] |
readShortArray(int cnt)
Read short array.
|
short |
readShortPositioned(int pos)
Read short at the given position.
|
int |
remaining()
Gets amount of remaining data in bytes.
|
public static BinaryByteBufferInputStream create(ByteBuffer buf)
buf - Buffer to wrap.public byte readByte()
readByte in interface BinaryInputStreampublic byte[] readByteArray(int cnt)
readByteArray in interface BinaryInputStreamcnt - Expected item count.public int read(byte[] arr,
int off,
int cnt)
cnt of bytes into byte array.read in interface BinaryInputStreamarr - Expected item count.off - offsetcnt - number of bytes to read.public boolean readBoolean()
readBoolean in interface BinaryInputStreampublic boolean[] readBooleanArray(int cnt)
readBooleanArray in interface BinaryInputStreamcnt - Expected item count.public short readShort()
readShort in interface BinaryInputStreampublic short[] readShortArray(int cnt)
readShortArray in interface BinaryInputStreamcnt - Expected item count.public char readChar()
readChar in interface BinaryInputStreampublic char[] readCharArray(int cnt)
readCharArray in interface BinaryInputStreamcnt - Expected item count.public int readInt()
readInt in interface BinaryInputStreampublic int[] readIntArray(int cnt)
readIntArray in interface BinaryInputStreamcnt - Expected item count.public float readFloat()
readFloat in interface BinaryInputStreampublic float[] readFloatArray(int cnt)
readFloatArray in interface BinaryInputStreamcnt - Expected item count.public long readLong()
readLong in interface BinaryInputStreampublic long[] readLongArray(int cnt)
readLongArray in interface BinaryInputStreamcnt - Expected item count.public double readDouble()
readDouble in interface BinaryInputStreampublic double[] readDoubleArray(int cnt)
readDoubleArray in interface BinaryInputStreamcnt - Expected item count.public int remaining()
remaining in interface BinaryInputStreampublic byte readBytePositioned(int pos)
readBytePositioned in interface BinaryPositionReadablepos - Position.public short readShortPositioned(int pos)
readShortPositioned in interface BinaryPositionReadablepos - Position.public int readIntPositioned(int pos)
readIntPositioned in interface BinaryPositionReadablepos - Position.public int position()
position in interface BinaryStreampublic void position(int pos)
position in interface BinaryStreampos - Position.public long rawOffheapPointer()
rawOffheapPointer in interface BinaryStream0.public int capacity()
capacity in interface BinaryStreampublic byte[] array()
array in interface BinaryStreampublic byte[] arrayCopy()
arrayCopy in interface BinaryStreampublic long offheapPointer()
offheapPointer in interface BinaryStream0.public boolean hasArray()
hasArray in interface BinaryStreamTrue is stream is array based.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017