Class BinaryOutput.ByteArrayBinaryOutput
java.lang.Object
org.graalvm.nativebridge.BinaryOutput
org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput
- Enclosing class:
BinaryOutput
A
BinaryOutput backed by a byte array.-
Nested Class Summary
Nested classes/interfaces inherited from class org.graalvm.nativebridge.BinaryOutput
BinaryOutput.ByteArrayBinaryOutput, BinaryOutput.CCharPointerBinaryOutput -
Field Summary
Fields inherited from class org.graalvm.nativebridge.BinaryOutput
pos -
Method Summary
Modifier and TypeMethodDescriptioncreate(int initialSize) Creates a new buffer backed by a byte array.byte[]getArray()Returns the byte array containing the marshalled data.voidskip(int numberOfBytes) Reserves a buffer space.voidwrite(byte[] b, int off, int len) Writeslenbytes from the bytearraystarting at offsetoff.voidwrite(int b) Writes the lowest byte of the argument as a single byte value.Methods inherited from class org.graalvm.nativebridge.BinaryOutput
create, create, create, getPosition, isTypedValue, write, write, write, write, write, write, write, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeTypedValue, writeUTF
-
Method Details
-
write
public void write(int b) Description copied from class:BinaryOutputWrites the lowest byte of the argument as a single byte value. The buffer position is incremented by1.- Specified by:
writein classBinaryOutput
-
write
public void write(byte[] b, int off, int len) Description copied from class:BinaryOutputWriteslenbytes from the bytearraystarting at offsetoff. The buffer position is incremented bylen.- Specified by:
writein classBinaryOutput
-
skip
public void skip(int numberOfBytes) Description copied from class:BinaryOutputReserves a buffer space. The reserved space can be used for out parameters.- Specified by:
skipin classBinaryOutput- Parameters:
numberOfBytes- number of bytes to reserve.
-
getArray
public byte[] getArray()Returns the byte array containing the marshalled data. -
create
Creates a new buffer backed by a byte array. The buffer initial size isinitialSize.
-