Class BinaryOutput.ByteArrayBinaryOutput

java.lang.Object
org.graalvm.nativebridge.BinaryOutput
org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput
Enclosing class:
BinaryOutput

public static final class BinaryOutput.ByteArrayBinaryOutput extends BinaryOutput
A BinaryOutput backed by a byte array.
  • Method Details

    • write

      public void write(int b)
      Description copied from class: BinaryOutput
      Writes the lowest byte of the argument as a single byte value. The buffer position is incremented by 1.
      Specified by:
      write in class BinaryOutput
    • write

      public void write(byte[] b, int off, int len)
      Description copied from class: BinaryOutput
      Writes len bytes from the byte array starting at offset off. The buffer position is incremented by len.
      Specified by:
      write in class BinaryOutput
    • skip

      public void skip(int numberOfBytes)
      Description copied from class: BinaryOutput
      Reserves a buffer space. The reserved space can be used for out parameters.
      Specified by:
      skip in class BinaryOutput
      Parameters:
      numberOfBytes - number of bytes to reserve.
    • getArray

      public byte[] getArray()
      Returns the byte array containing the marshalled data.
    • create

      public static BinaryOutput.ByteArrayBinaryOutput create(int initialSize)
      Creates a new buffer backed by a byte array. The buffer initial size is initialSize.