private static final class HeapInvocationBuffer.DefaultEncoder extends HeapInvocationBuffer.Encoder
| Modifier and Type | Field and Description |
|---|---|
private HeapInvocationBuffer.ArrayIO |
io |
| Constructor and Description |
|---|
DefaultEncoder(HeapInvocationBuffer.ArrayIO io) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBufferSize(CallContext callContext)
Gets the size in bytes of the buffer required for the function
|
int |
putAddress(byte[] buffer,
int offset,
long value)
Encodes a native memory address value into the byte array.
|
int |
putByte(byte[] buffer,
int offset,
int value)
Encodes a byte value into the byte array.
|
int |
putDouble(byte[] buffer,
int offset,
double value)
Encodes a double value into the byte array.
|
int |
putFloat(byte[] buffer,
int offset,
float value)
Encodes a float value into the byte array.
|
int |
putInt(byte[] buffer,
int offset,
int value)
Encodes an int value into the byte array.
|
int |
putLong(byte[] buffer,
int offset,
long value)
Encodes a long value into the byte array.
|
int |
putShort(byte[] buffer,
int offset,
int value)
Encodes a short value into the byte array.
|
int |
skipAddress(int offset) |
getInstanceprivate final HeapInvocationBuffer.ArrayIO io
public DefaultEncoder(HeapInvocationBuffer.ArrayIO io)
public final int getBufferSize(CallContext callContext)
HeapInvocationBuffer.EncodergetBufferSize in class HeapInvocationBuffer.Encoderpublic final int putByte(byte[] buffer,
int offset,
int value)
HeapInvocationBuffer.EncoderputByte in class HeapInvocationBuffer.Encoderbuffer - The destination byte buffer to place the encoded value.offset - The offset within the destination buffer to place the value.value - The value to encode.public final int putShort(byte[] buffer,
int offset,
int value)
HeapInvocationBuffer.EncoderputShort in class HeapInvocationBuffer.Encoderbuffer - The destination byte buffer to place the encoded value.offset - The offset within the destination buffer to place the value.value - The value to encode.public final int putInt(byte[] buffer,
int offset,
int value)
HeapInvocationBuffer.EncoderputInt in class HeapInvocationBuffer.Encoderbuffer - The destination byte buffer to place the encoded value.offset - The offset within the destination buffer to place the value.value - The value to encode.public final int putLong(byte[] buffer,
int offset,
long value)
HeapInvocationBuffer.EncoderputLong in class HeapInvocationBuffer.Encoderbuffer - The destination byte buffer to place the encoded value.offset - The offset within the destination buffer to place the value.value - The value to encode.public final int putFloat(byte[] buffer,
int offset,
float value)
HeapInvocationBuffer.EncoderputFloat in class HeapInvocationBuffer.Encoderbuffer - The destination byte buffer to place the encoded value.offset - The offset within the destination buffer to place the value.value - The value to encode.public final int putDouble(byte[] buffer,
int offset,
double value)
HeapInvocationBuffer.EncoderputDouble in class HeapInvocationBuffer.Encoderbuffer - The destination byte buffer to place the encoded value.offset - The offset within the destination buffer to place the value.value - The value to encode.public final int putAddress(byte[] buffer,
int offset,
long value)
HeapInvocationBuffer.EncoderputAddress in class HeapInvocationBuffer.Encoderbuffer - The destination byte buffer to place the encoded value.offset - The offset within the destination buffer to place the value.value - The value to encode.public int skipAddress(int offset)
skipAddress in class HeapInvocationBuffer.Encoder