public static final class BinaryOutput.CCharPointerBinaryOutput extends BinaryOutput implements Closeable
BinaryOutput
backed by an off-heap memory.BinaryOutput.ByteArrayBinaryOutput, BinaryOutput.CCharPointerBinaryOutput
pos
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, writeUTF
public int getPosition()
BinaryOutput
getPosition
in class BinaryOutput
public org.graalvm.nativeimage.c.type.CCharPointer getAddress()
public void write(int b)
BinaryOutput
1
.write
in class BinaryOutput
public void write(byte[] b, int off, int len)
BinaryOutput
len
bytes from the byte array
starting at offset off
. The
buffer position is incremented by len
.write
in class BinaryOutput
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public static BinaryOutput.CCharPointerBinaryOutput create(int initialSize)
initialSize
.