public final class PortableHeapOutputStream 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 |
|---|
PortableHeapOutputStream()
Constructor.
|
PortableHeapOutputStream(byte[] data)
Constructor.
|
PortableHeapOutputStream(byte[] data,
PortableMemoryAllocator alloc)
Constructor.
|
PortableHeapOutputStream(int cap)
Constructor.
|
PortableHeapOutputStream(int cap,
PortableMemoryAllocator alloc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
byte[] |
arrayCopy() |
void |
close()
Close the stream releasing resources.
|
protected void |
copyAndShift(Object src,
long off,
int len)
Copy source object to the stream shift position afterwards.
|
void |
ensureCapacity(int cnt)
Ensure capacity.
|
boolean |
hasArray() |
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 PortableHeapOutputStream()
public PortableHeapOutputStream(int cap)
cap - Initial capacity.public PortableHeapOutputStream(int cap,
PortableMemoryAllocator alloc)
cap - Initial capacity.alloc - Allocator.public PortableHeapOutputStream(byte[] data)
data - Data.public PortableHeapOutputStream(byte[] data,
PortableMemoryAllocator alloc)
data - Data.alloc - Allocator.public void close()
public void ensureCapacity(int cnt)
ensureCapacity in class PortableAbstractOutputStreamcnt - Required byte count.public byte[] array()
public byte[] arrayCopy()
public boolean hasArray()
True is stream is array based.protected void writeByteAndShift(byte val)
writeByteAndShift in class PortableAbstractOutputStreamval - Value.protected void copyAndShift(Object src, long off, int len)
copyAndShift in class PortableAbstractOutputStreamsrc - Source.off - 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.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015