public class BinaryOffheapOutputStream extends BinaryAbstractOutputStream
BYTE_ONE, BYTE_ZERO, pos| Constructor and Description |
|---|
BinaryOffheapOutputStream(int cap)
Constructor.
|
BinaryOffheapOutputStream(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.
|
void |
unsafeWriteByte(byte val)
Write byte in unsafe mode.
|
void |
unsafeWriteChar(char val)
Write char in unsafe mode.
|
void |
unsafeWriteInt(int val)
Write int in unsafe mode.
|
void |
unsafeWriteInt(int pos,
int val)
Write int in unsafe mode.
|
void |
unsafeWriteLong(long val)
Write long in unsafe mode.
|
void |
unsafeWriteShort(int pos,
short val)
Write short in unsafe mode.
|
void |
unsafeWriteShort(short val)
Write short in unsafe mode.
|
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 |
writeLongFast(long val)
Write long value (fast path).
|
protected void |
writeShortFast(short val)
Write short value (fast path).
|
capacity, offheapPointer, position, rawOffheapPointer, unsafeEnsure, unsafePosition, unsafeWriteBoolean, unsafeWriteDouble, unsafeWriteFloat, write, write, writeBoolean, writeBooleanArray, writeByte, writeByteArray, writeChar, writeCharArray, writeDouble, writeDoubleArray, writeFloat, writeFloatArray, writeInt, writeInt, writeIntArray, writeLong, writeLongArray, writeShort, writeShort, writeShortArrayposition, shiftclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpositionpublic BinaryOffheapOutputStream(int cap)
cap - Capacity.public BinaryOffheapOutputStream(long ptr,
int cap)
ptr - Pointer to existing address.cap - Capacity.public void close()
public void ensureCapacity(int cnt)
ensureCapacity in class BinaryAbstractOutputStreamcnt - Required byte count.public byte[] array()
public byte[] arrayCopy()
public long pointer()
public int capacity()
protected void writeByteAndShift(byte val)
writeByteAndShift in class BinaryAbstractOutputStreamval - Value.protected void copyAndShift(Object src, long offset, int len)
copyAndShift in class BinaryAbstractOutputStreamsrc - Source.offset - Offset.len - Length.protected void writeShortFast(short val)
writeShortFast in class BinaryAbstractOutputStreamval - Short value.protected void writeCharFast(char val)
writeCharFast in class BinaryAbstractOutputStreamval - Char value.protected void writeIntFast(int val)
writeIntFast in class BinaryAbstractOutputStreamval - Int value.protected void writeLongFast(long val)
writeLongFast in class BinaryAbstractOutputStreamval - Long value.public boolean hasArray()
True is stream is array based.public void unsafeWriteByte(byte val)
val - Value.public void unsafeWriteShort(short val)
val - Value.public void unsafeWriteShort(int pos,
short val)
pos - Position.val - Value.public void unsafeWriteChar(char val)
val - Value.public void unsafeWriteInt(int val)
val - Value.public void unsafeWriteInt(int pos,
int val)
pos - Position.val - Value.public void unsafeWriteLong(long val)
val - Value.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. 2.5.0 Release Date : May 23 2018