public class PortableOffheapInputStream extends PortableAbstractInputStream
lenBOOLEAN_ARR_OFF, BYTE_ARR_OFF, BYTE_ONE, BYTE_ZERO, CHAR_ARR_OFF, DOUBLE_ARR_OFF, FLOAT_ARR_OFF, INT_ARR_OFF, LITTLE_ENDIAN, LONG_ARR_OFF, pos, SHORT_ARR_OFF, UNSAFE| Constructor and Description |
|---|
PortableOffheapInputStream(long ptr,
int cap)
Constructor.
|
PortableOffheapInputStream(long ptr,
int cap,
boolean forceHeap)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
byte[] |
arrayCopy() |
protected void |
copyAndShift(Object target,
long off,
int len)
Copy data to target object shift position afterwards.
|
boolean |
hasArray() |
long |
offheapPointer() |
protected byte |
readByteAndShift()
Read next byte from the stream and perform shift.
|
protected char |
readCharFast()
Read char value (fast path).
|
protected int |
readIntFast()
Read int value (fast path).
|
protected int |
readIntPositioned(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).
|
int |
remaining()
Gets amount of remaining data in bytes.
|
ensureEnoughData, position, read, readBoolean, readBooleanArray, readByte, readByteArray, readChar, readCharArray, readDouble, readDoubleArray, readFloat, readFloatArray, readInt, readInt, readIntArray, readLong, readLongArray, readShort, readShortArrayposition, shiftclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpositionpublic PortableOffheapInputStream(long ptr,
int cap)
ptr - Pointer.cap - Capacity.public PortableOffheapInputStream(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 byte[] array()
public byte[] arrayCopy()
public boolean hasArray()
True is stream is array based.protected byte readByteAndShift()
readByteAndShift in class PortableAbstractInputStreamprotected void copyAndShift(Object target, long off, int len)
copyAndShift in class PortableAbstractInputStreamtarget - Target.off - Offset.len - Length.protected short readShortFast()
readShortFast in class PortableAbstractInputStreamprotected char readCharFast()
readCharFast in class PortableAbstractInputStreamprotected int readIntFast()
readIntFast in class PortableAbstractInputStreamprotected long readLongFast()
readLongFast in class PortableAbstractInputStreamprotected int readIntPositioned(int pos)
readIntPositioned in class PortableAbstractInputStreampos - Position.public long offheapPointer()
offheapPointer in interface PortableStreamoffheapPointer in class PortableAbstractInputStream0.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015