public class PlatformInputStreamImpl extends Object implements PlatformInputStream
| Constructor and Description |
|---|
PlatformInputStreamImpl(PlatformMemory mem)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
byte[] |
arrayCopy() |
int |
capacity() |
boolean |
hasArray() |
long |
offheapPointer() |
int |
position() |
void |
position(int pos) |
long |
rawOffheapPointer() |
int |
read(byte[] arr,
int off,
int len)
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.
|
void |
synchronize()
Synchronize input.
|
public PlatformInputStreamImpl(PlatformMemory mem)
mem - Underlying memory chunk.public byte readByte()
readByte in interface BinaryInputStreampublic byte[] readByteArray(int cnt)
readByteArray in interface BinaryInputStreamcnt - Expected item count.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 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[] 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 read(byte[] arr,
int off,
int len)
cnt of bytes into byte array.read in interface BinaryInputStreamarr - Expected item count.off - offsetlen - number of bytes to read.public int remaining()
remaining in interface BinaryInputStreampublic int capacity()
capacity in interface BinaryStreampublic int position()
position in interface BinaryStreampublic void position(int pos)
position in interface BinaryStreampos - Position.public byte[] array()
array in interface BinaryStreampublic byte[] arrayCopy()
arrayCopy in interface BinaryStreampublic long offheapPointer()
offheapPointer in interface BinaryStream0.public long rawOffheapPointer()
rawOffheapPointer in interface BinaryStream0.public boolean hasArray()
hasArray in interface BinaryStreamTrue is stream is array based.public void synchronize()
synchronize in interface PlatformInputStream
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018