abstract static class HeapInvocationBuffer.Encoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
HeapInvocationBuffer.Encoder.SingletonHolder |
Constructor and Description |
---|
Encoder() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getBufferSize(CallContext callContext)
Gets the size in bytes of the buffer required for the function
|
(package private) static HeapInvocationBuffer.Encoder |
getInstance() |
abstract int |
putAddress(byte[] buffer,
int offset,
long value)
Encodes a native memory address value into the byte array.
|
abstract int |
putByte(byte[] buffer,
int offset,
int value)
Encodes a byte value into the byte array.
|
abstract int |
putDouble(byte[] buffer,
int offset,
double value)
Encodes a double value into the byte array.
|
abstract int |
putFloat(byte[] buffer,
int offset,
float value)
Encodes a float value into the byte array.
|
abstract int |
putInt(byte[] buffer,
int offset,
int value)
Encodes an int value into the byte array.
|
abstract int |
putLong(byte[] buffer,
int offset,
long value)
Encodes a long value into the byte array.
|
abstract int |
putShort(byte[] buffer,
int offset,
int value)
Encodes a short value into the byte array.
|
abstract int |
skipAddress(int offset) |
static HeapInvocationBuffer.Encoder getInstance()
public abstract int getBufferSize(CallContext callContext)
public abstract int putByte(byte[] buffer, int offset, int value)
buffer
- 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 abstract int putShort(byte[] buffer, int offset, int value)
buffer
- 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 abstract int putInt(byte[] buffer, int offset, int value)
buffer
- 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 abstract int putLong(byte[] buffer, int offset, long value)
buffer
- 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 abstract int putFloat(byte[] buffer, int offset, float value)
buffer
- 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 abstract int putDouble(byte[] buffer, int offset, double value)
buffer
- 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 abstract int putAddress(byte[] buffer, int offset, long value)
buffer
- 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 abstract int skipAddress(int offset)