Interface BinaryInputStream
-
- All Superinterfaces:
BinaryPositionReadable
public interface BinaryInputStream extends BinaryPositionReadable
Binary input stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]array()byte[]arrayCopy()intcapacity()booleanhasArray()longoffheapPointer()intposition()voidposition(int pos)longrawOffheapPointer()intread(byte[] arr, int off, int cnt)Readscntof bytes into byte array.booleanreadBoolean()Read boolean value.boolean[]readBooleanArray(int cnt)Read boolean array.bytereadByte()Read byte value.byte[]readByteArray(int cnt)Read byte array.charreadChar()Read char value.char[]readCharArray(int cnt)Read char array.doublereadDouble()Read double value.double[]readDoubleArray(int cnt)Read double array.floatreadFloat()Read float value.float[]readFloatArray(int cnt)Read float array.intreadInt()Read int value.int[]readIntArray(int cnt)Read int array.longreadLong()Read long value.long[]readLongArray(int cnt)Read long array.shortreadShort()Read short value.short[]readShortArray(int cnt)Read short array.intremaining()Gets amount of remaining data in bytes.-
Methods inherited from interface org.apache.ignite.internal.binary.BinaryPositionReadable
readBytePositioned, readIntPositioned, readShortPositioned
-
-
-
-
Method Detail
-
readByte
byte readByte()
Read byte value.- Returns:
- Byte value.
-
readByteArray
byte[] readByteArray(int cnt)
Read byte array.- Parameters:
cnt- Expected item count.- Returns:
- Byte array.
-
read
int read(byte[] arr, int off, int cnt)Readscntof bytes into byte array.- Parameters:
arr- Expected item count.off- offsetcnt- number of bytes to read.- Returns:
- actual length read.
-
readBoolean
boolean readBoolean()
Read boolean value.- Returns:
- Boolean value.
-
readBooleanArray
boolean[] readBooleanArray(int cnt)
Read boolean array.- Parameters:
cnt- Expected item count.- Returns:
- Boolean array.
-
readShort
short readShort()
Read short value.- Returns:
- Short value.
-
readShortArray
short[] readShortArray(int cnt)
Read short array.- Parameters:
cnt- Expected item count.- Returns:
- Short array.
-
readChar
char readChar()
Read char value.- Returns:
- Char value.
-
readCharArray
char[] readCharArray(int cnt)
Read char array.- Parameters:
cnt- Expected item count.- Returns:
- Char array.
-
readInt
int readInt()
Read int value.- Returns:
- Int value.
-
readIntArray
int[] readIntArray(int cnt)
Read int array.- Parameters:
cnt- Expected item count.- Returns:
- Int array.
-
readFloat
float readFloat()
Read float value.- Returns:
- Float value.
-
readFloatArray
float[] readFloatArray(int cnt)
Read float array.- Parameters:
cnt- Expected item count.- Returns:
- Float array.
-
readLong
long readLong()
Read long value.- Returns:
- Long value.
-
readLongArray
long[] readLongArray(int cnt)
Read long array.- Parameters:
cnt- Expected item count.- Returns:
- Long array.
-
readDouble
double readDouble()
Read double value.- Returns:
- Double value.
-
readDoubleArray
double[] readDoubleArray(int cnt)
Read double array.- Parameters:
cnt- Expected item count.- Returns:
- Double array.
-
remaining
int remaining()
Gets amount of remaining data in bytes.- Returns:
- Remaining data.
-
position
int position()
- Returns:
- Position.
-
position
void position(int pos)
- Parameters:
pos- Position.
-
array
byte[] array()
- Returns:
- Underlying array.
-
arrayCopy
byte[] arrayCopy()
- Returns:
- Copy of data in the stream.
-
offheapPointer
long offheapPointer()
- Returns:
- Offheap pointer if stream is offheap based and "forceHeap" flag is not set; otherwise
0.
-
rawOffheapPointer
long rawOffheapPointer()
- Returns:
- Offheap pointer if stream is offheap based; otherwise
0.
-
hasArray
boolean hasArray()
- Returns:
Trueis stream is array based.
-
capacity
int capacity()
- Returns:
- Total capacity.
-
-