public class PortableOffheapOutputStream extends PortableAbstractOutputStream
BOOLEAN_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 |
|---|
PortableOffheapOutputStream(int cap)
Constructor.
|
PortableOffheapOutputStream(long ptr,
int cap)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
allocate(int cap)
Allocate memory.
|
byte[] |
array() |
byte[] |
arrayCopy() |
int |
capacity() |
void |
close()
Close the stream releasing resources.
|
protected void |
copyAndShift(Object src,
long offset,
int len)
Copy source object to the stream shift position afterwards.
|
void |
ensureCapacity(int cnt)
Ensure capacity.
|
boolean |
hasArray() |
long |
pointer() |
protected long |
reallocate(long ptr,
int cap)
Reallocate memory.
|
protected void |
release(long ptr)
Release memory.
|
protected void |
writeByteAndShift(byte val)
Write next byte to the stream.
|
protected void |
writeCharFast(char val)
Write char value (fast path).
|
protected void |
writeIntFast(int val)
Write int value (fast path).
|
protected void |
writeIntPositioned(int pos,
int val)
Write int value to the given position.
|
protected void |
writeLongFast(long val)
Write long value (fast path).
|
protected void |
writeShortFast(short val)
Write short value (fast path).
|
capacity, offheapPointer, position, write, write, writeBoolean, writeBooleanArray, writeByte, writeByteArray, writeChar, writeCharArray, writeDouble, writeDoubleArray, writeFloat, writeFloatArray, writeInt, writeInt, writeIntArray, writeLong, writeLongArray, writeShort, writeShortArrayposition, shiftclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpositionpublic PortableOffheapOutputStream(int cap)
cap - Capacity.public PortableOffheapOutputStream(long ptr,
int cap)
ptr - Pointer to existing address.cap - Capacity.public void close()
public void ensureCapacity(int cnt)
ensureCapacity in class PortableAbstractOutputStreamcnt - Required byte count.public byte[] array()
public byte[] arrayCopy()
public long pointer()
public int capacity()
protected void writeByteAndShift(byte val)
writeByteAndShift in class PortableAbstractOutputStreamval - Value.protected void copyAndShift(Object src, long offset, int len)
copyAndShift in class PortableAbstractOutputStreamsrc - Source.offset - Offset.len - Length.protected void writeShortFast(short val)
writeShortFast in class PortableAbstractOutputStreamval - Short value.protected void writeCharFast(char val)
writeCharFast in class PortableAbstractOutputStreamval - Char value.protected void writeIntFast(int val)
writeIntFast in class PortableAbstractOutputStreamval - Int value.protected void writeLongFast(long val)
writeLongFast in class PortableAbstractOutputStreamval - Long value.protected void writeIntPositioned(int pos,
int val)
writeIntPositioned in class PortableAbstractOutputStreampos - Position.val - Value.public boolean hasArray()
True is stream is array based.protected long allocate(int cap)
cap - Capacity.protected long reallocate(long ptr,
int cap)
ptr - Old pointer.cap - Capacity.protected void release(long ptr)
ptr - Pointer.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015