BinaryMarshaller to marshall parameters and results passed by value.
BinaryInput, BinaryMarshaller, Builder#registerMarshaller(Class, BinaryMarshaller)
| Modifier and Type | Class and Description |
|---|---|
| public static class | BinaryOutput.
A |
| public static class | BinaryOutput.
A |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final byte | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| pack-priv static final int | LARGE_STRING_TAG
Tag to distinguish between long and short string. |
| pack-priv static final byte | |
| private static final int | MAX_LENGTH
Maximum string length for string encoded by 4 bytes length followed be content. |
| private static final int | MAX_SHORT_LENGTH
Maximum string length for string encoded by 2 bytes length followed be content. |
| pack-priv static final byte | |
| protected int | |
| pack-priv static final byte | |
| pack-priv static final byte | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static int | |
| public static BinaryOutput. | |
| public static BinaryOutput. | |
| public static BinaryOutput. | create(CCharPointer
the off-heap memory address address, int the off-heap memory size length, boolean true if the memory was dynamically allocated and should
be freed when the buffer is closed; false for the stack allocated memory.Creates a new buffer wrapping an off-heap memory segment starting at |
| private void | |
| public int | |
| public static boolean | isTypedValue(Object value)
Returns |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public final void | write(boolean[] array, int off, int len)
Writes |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | writeDouble(double value)
Converts a |
| public final void | writeFloat(float value)
Converts a |
| public final void | |
| public final void | |
| public final void | |
| public final void | writeTypedValue(Object value)
Writes the value that is represented by the given object, together with information on the value's data type. |
| public final void |
| ARRAY | back to summary |
|---|---|
| pack-priv static final byte ARRAY | |
| BOOLEAN | back to summary |
|---|---|
| pack-priv static final byte BOOLEAN | |
| BYTE | back to summary |
|---|---|
| pack-priv static final byte BYTE | |
| CHAR | back to summary |
|---|---|
| pack-priv static final byte CHAR | |
| DOUBLE | back to summary |
|---|---|
| pack-priv static final byte DOUBLE | |
| FLOAT | back to summary |
|---|---|
| pack-priv static final byte FLOAT | |
| INT | back to summary |
|---|---|
| pack-priv static final byte INT | |
| LARGE_STRING_TAG | back to summary |
|---|---|
| pack-priv static final int LARGE_STRING_TAG Tag to distinguish between long and short string. The tag is set in the first string length byte. | |
| LONG | back to summary |
|---|---|
| pack-priv static final byte LONG | |
| MAX_LENGTH | back to summary |
|---|---|
| private static final int MAX_LENGTH Maximum string length for string encoded by 4 bytes length followed be content. | |
| MAX_SHORT_LENGTH | back to summary |
|---|---|
| private static final int MAX_SHORT_LENGTH Maximum string length for string encoded by 2 bytes length followed be content. | |
| NULL | back to summary |
|---|---|
| pack-priv static final byte NULL | |
| pos | back to summary |
|---|---|
| protected int pos | |
| SHORT | back to summary |
|---|---|
| pack-priv static final byte SHORT | |
| STRING | back to summary |
|---|---|
| pack-priv static final byte STRING | |
| tempDecodingBuffer | back to summary |
|---|---|
| private byte[] tempDecodingBuffer | |
| BinaryOutput | back to summary |
|---|---|
| private BinaryOutput() | |
| bufferSize | back to summary |
|---|---|
| pack-priv static int bufferSize(int headerSize, int dataSize) | |
| create | back to summary |
|---|---|
| public static BinaryOutput. Creates a new buffer backed by a byte array. | |
| create | back to summary |
|---|---|
| public static BinaryOutput. Creates a new buffer wrapping the | |
| create | back to summary |
|---|---|
| public static BinaryOutput. Creates a new buffer wrapping an off-heap memory segment starting at
| |
| ensureBufferSize | back to summary |
|---|---|
| private void ensureBufferSize(int headerSize, int dataSize) | |
| getPosition | back to summary |
|---|---|
| public int getPosition() Returns this buffer's position. | |
| isTypedValue | back to summary |
|---|---|
| public static boolean isTypedValue(Object value) Returns | |
| skip | back to summary |
|---|---|
| public abstract void skip(int numberOfBytes) Reserves a buffer space. The reserved space can be used for out parameters.
| |
| write | back to summary |
|---|---|
| public abstract void write(int b) Writes the lowest byte of the argument as a single byte value. The buffer position is
incremented by | |
| write | back to summary |
|---|---|
| public abstract void write(byte[] array, int off, int len) Writes | |
| write | back to summary |
|---|---|
| public final void write(boolean[] array, int off, int len) Writes | |
| write | back to summary |
|---|---|
| public final void write(short[] array, int off, int len) Writes | |
| write | back to summary |
|---|---|
| public final void write(char[] array, int off, int len) Writes | |
| write | back to summary |
|---|---|
| public final void write(int[] array, int off, int len) Writes | |
| write | back to summary |
|---|---|
| public final void write(long[] array, int off, int len) Writes | |
| write | back to summary |
|---|---|
| public final void write(float[] array, int off, int len) Writes | |
| write | back to summary |
|---|---|
| public final void write(double[] array, int off, int len) Writes | |
| writeBoolean | back to summary |
|---|---|
| public final void writeBoolean(boolean value) Writes a | |
| writeByte | back to summary |
|---|---|
| public final void writeByte(int value) Writes a | |
| writeChar | back to summary |
|---|---|
| public final void writeChar(int value) Writes a | |
| writeDouble | back to summary |
|---|---|
| public final void writeDouble(double value) Converts a | |
| writeFloat | back to summary |
|---|---|
| public final void writeFloat(float value) Converts a | |
| writeInt | back to summary |
|---|---|
| public final void writeInt(int value) Writes an | |
| writeLong | back to summary |
|---|---|
| public final void writeLong(long value) Writes a | |
| writeShort | back to summary |
|---|---|
| public final void writeShort(int value) Writes a | |
| writeTypedValue | back to summary |
|---|---|
| public final void writeTypedValue(Object value) throws IllegalArgumentException Writes the value that is represented by the given object, together with information on the
value's data type. Supported types are boxed Java primitive types,
| |
| writeUTF | back to summary |
|---|---|
| public final void writeUTF(String string) throws IllegalArgumentException Writes a string using a modified UTF-8 encoding in a machine-independent manner.
| |
BinaryOutput backed by a byte array.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| pack-priv static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static BinaryOutput. | |
| private void | |
| public byte[] | |
| public void | skip(int
number of bytes to reserve. numberOfBytes)Implements abstract org. Reserves a buffer space. |
| public void | write(int b)
Implements abstract org. Writes the lowest byte of the argument as a single byte value. |
| public void | write(byte[] b, int off, int len)
Implements abstract org. Writes |
| buffer | back to summary |
|---|---|
| private byte[] buffer | |
| INITIAL_SIZE | back to summary |
|---|---|
| pack-priv static final int INITIAL_SIZE | |
| MAX_ARRAY_SIZE | back to summary |
|---|---|
| private static final int MAX_ARRAY_SIZE | |
| ByteArrayBinaryOutput | back to summary |
|---|---|
| private ByteArrayBinaryOutput(int size) | |
| ByteArrayBinaryOutput | back to summary |
|---|---|
| private ByteArrayBinaryOutput(byte[] initialBuffer) | |
| create | back to summary |
|---|---|
| public static BinaryOutput. Creates a new buffer backed by a byte array. The buffer initial size is
| |
| ensureCapacity | back to summary |
|---|---|
| private void ensureCapacity(int neededCapacity) | |
| getArray | back to summary |
|---|---|
| public byte[] getArray() Returns the byte array containing the marshalled data. | |
| skip | back to summary |
|---|---|
| public void skip(int numberOfBytes) Implements abstract org. Doc from org. Reserves a buffer space. The reserved space can be used for out parameters.
| |
| write | back to summary |
|---|---|
| public void write(int b) Implements abstract org. Doc from org. Writes the lowest byte of the argument as a single byte value. The buffer position is
incremented by
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) Implements abstract org. Doc from org. Writes
| |
BinaryOutput backed by an off-heap memory.
| Modifier and Type | Field and Description |
|---|---|
| private CCharPointer | |
| private static final int | BYTEBUFFER_COPY_FROM_ARRAY_THRESHOLD
Represents the point at which the average cost of a JNI call exceeds the expense of an element by element copy. |
| private ByteBuffer | byteBufferView
ByteBuffer view of this |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Implements java. Closes the buffer and frees off-heap allocated resources. |
| public static BinaryOutput. | |
| private void | |
| public CCharPointer | |
| public int | getPosition()
Overrides org. Returns this buffer's position. |
| private static void | |
| public void | skip(int
number of bytes to reserve. numberOfBytes)Implements abstract org. Reserves a buffer space. |
| public void | write(int b)
Implements abstract org. Writes the lowest byte of the argument as a single byte value. |
| public void | write(byte[] b, int off, int len)
Implements abstract org. Writes |
| address | back to summary |
|---|---|
| private CCharPointer address | |
| BYTEBUFFER_COPY_FROM_ARRAY_THRESHOLD | back to summary |
|---|---|
| private static final int BYTEBUFFER_COPY_FROM_ARRAY_THRESHOLD Represents the point at which the average cost of a JNI call exceeds the expense of an
element by element copy. See | |
| byteBufferView | back to summary |
|---|---|
| private ByteBuffer byteBufferView ByteBuffer view of this | |
| length | back to summary |
|---|---|
| private int length | |
| unmanaged | back to summary |
|---|---|
| private boolean unmanaged | |
| CCharPointerBinaryOutput | back to summary |
|---|---|
| private CCharPointerBinaryOutput(CCharPointer address, int length, boolean unmanaged) | |
| checkClosed | back to summary |
|---|---|
| private void checkClosed() | |
| close | back to summary |
|---|---|
| public void close() Implements java. Closes the buffer and frees off-heap allocated resources.
| |
| create | back to summary |
|---|---|
| public static BinaryOutput. Creates a new buffer backed by an off-heap memory segment. The buffer initial size is
| |
| ensureCapacity | back to summary |
|---|---|
| private void ensureCapacity(int neededCapacity) | |
| getAddress | back to summary |
|---|---|
| public CCharPointer getAddress() Returns an address of an off-heap memory segment containing the marshalled data. | |
| getPosition | back to summary |
|---|---|
| public int getPosition() Overrides org. Doc from org. Returns this buffer's position.
| |
| memcpy | back to summary |
|---|---|
| private static void memcpy(CCharPointer dst, CCharPointer src, int len) | |
| skip | back to summary |
|---|---|
| public void skip(int numberOfBytes) Implements abstract org. Doc from org. Reserves a buffer space. The reserved space can be used for out parameters.
| |
| write | back to summary |
|---|---|
| public void write(int b) Implements abstract org. Doc from org. Writes the lowest byte of the argument as a single byte value. The buffer position is
incremented by
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) Implements abstract org. Doc from org. Writes
| |