public class BinaryOffheapInputStream extends BinaryAbstractInputStream
len
BYTE_ONE, BYTE_ZERO, pos
Constructor and Description |
---|
BinaryOffheapInputStream(long ptr,
int cap)
Constructor.
|
BinaryOffheapInputStream(long ptr,
int cap,
boolean forceHeap)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
array() |
byte[] |
arrayCopy() |
int |
capacity() |
protected void |
copyAndShift(Object target,
long off,
int len)
Copy data to target object shift position afterwards.
|
boolean |
hasArray() |
long |
offheapPointer() |
long |
rawOffheapPointer() |
protected byte |
readByteAndShift()
Read next byte from the stream and perform shift.
|
protected byte |
readBytePositioned0(int pos)
Internal routine for positioned byte value read.
|
protected char |
readCharFast()
Read char value (fast path).
|
protected int |
readIntFast()
Read int value (fast path).
|
protected int |
readIntPositioned0(int pos)
Internal routine for positioned int value read.
|
protected long |
readLongFast()
Read long value (fast path).
|
protected short |
readShortFast()
Read short value (fast path).
|
protected short |
readShortPositioned0(int pos)
Internal routine for positioned short value read.
|
int |
remaining()
Gets amount of remaining data in bytes.
|
ensureEnoughData, position, read, readBoolean, readBooleanArray, readByte, readByteArray, readBytePositioned, readChar, readCharArray, readDouble, readDoubleArray, readFloat, readFloatArray, readInt, readIntArray, readIntPositioned, readLong, readLongArray, readShort, readShortArray, readShortPositioned
position, shift
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
position
public BinaryOffheapInputStream(long ptr, int cap)
ptr
- Pointer.cap
- Capacity.public BinaryOffheapInputStream(long ptr, int cap, boolean forceHeap)
ptr
- Pointer.cap
- Capacity.forceHeap
- If true
method offheapPointer()
returns 0 and unmarshalling will
create heap-based objects.public int remaining()
public int capacity()
public byte[] array()
public byte[] arrayCopy()
public boolean hasArray()
True
is stream is array based.protected byte readByteAndShift()
readByteAndShift
in class BinaryAbstractInputStream
protected void copyAndShift(Object target, long off, int len)
copyAndShift
in class BinaryAbstractInputStream
target
- Target.off
- Offset.len
- Length.protected short readShortFast()
readShortFast
in class BinaryAbstractInputStream
protected char readCharFast()
readCharFast
in class BinaryAbstractInputStream
protected int readIntFast()
readIntFast
in class BinaryAbstractInputStream
protected long readLongFast()
readLongFast
in class BinaryAbstractInputStream
protected byte readBytePositioned0(int pos)
readBytePositioned0
in class BinaryAbstractInputStream
pos
- Position.protected short readShortPositioned0(int pos)
readShortPositioned0
in class BinaryAbstractInputStream
pos
- Position.protected int readIntPositioned0(int pos)
readIntPositioned0
in class BinaryAbstractInputStream
pos
- Position.public long offheapPointer()
offheapPointer
in interface BinaryStream
offheapPointer
in class BinaryAbstractInputStream
0
.public long rawOffheapPointer()
rawOffheapPointer
in interface BinaryStream
rawOffheapPointer
in class BinaryAbstractInputStream
0
.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017