public static final class BinaryOutput.CCharPointerBinaryOutput extends BinaryOutput implements Closeable
BinaryOutput backed by an off-heap memory.BinaryOutput.ByteArrayBinaryOutput, BinaryOutput.CCharPointerBinaryOutputpos| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the buffer and frees off-heap allocated resources.
|
static BinaryOutput.CCharPointerBinaryOutput |
create(int initialSize)
Creates a new buffer backed by an off-heap memory segment.
|
org.graalvm.nativeimage.c.type.CCharPointer |
getAddress()
Returns an address of an off-heap memory segment containing the marshalled data.
|
int |
getPosition()
Returns this buffer's position.
|
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the byte array starting at offset off. |
void |
write(int b)
Writes the lowest byte of the argument as a single byte value.
|
create, create, create, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeTypedValue, writeUTFpublic int getPosition()
BinaryOutputgetPosition in class BinaryOutputpublic org.graalvm.nativeimage.c.type.CCharPointer getAddress()
public void write(int b)
BinaryOutput1.write in class BinaryOutputpublic void write(byte[] b,
int off,
int len)
BinaryOutputlen bytes from the byte array starting at offset off. The
buffer position is incremented by len.write in class BinaryOutputpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic static BinaryOutput.CCharPointerBinaryOutput create(int initialSize)
initialSize.