Klasse Bytes

Alle implementierten Schnittstellen:
PointerInterface
Bekannte direkte Unterklassen:
Str

public class Bytes extends Array
  • Konstruktordetails

    • Bytes

      public Bytes(PointerContainer pointer, int size)
      Create a reference to a byte array of specific size
      Parameter:
      pointer - pointer to byte array
      size - size of byte array
    • Bytes

      public Bytes(PointerContainer pointer)
      Create a reference to a byte array of unknown size
      Parameter:
      pointer - pointer to byte array
    • Bytes

      public Bytes(byte[] bytes)
      Allocates a byte array in the c heap of size bytes.length. Copies bytes to allocated array.
      Parameter:
      bytes - bytes to copy to c heap
    • Bytes

      public Bytes(byte[] bytes, byte terminate)
      Allocates a byte array of size bytes.length + 1) in the c heap. Copies bytes to allocated array and adds one byte at the end.
      Parameter:
      bytes - bytes to copy to the allocated array
      terminate - byte to add at the end of the allocated array
    • Bytes

      public Bytes(int size)
      Allocates a byte array in the c heap of a specific size. Array is initialized with zeros.
      Parameter:
      size - size of new array
  • Methodendetails

    • getByte

      public byte getByte(int index)
    • setByte

      public void setByte(int index, byte value)
    • setInt

      public void setInt(int index, int value)
      Write value to the next four bytes starting at index
      Parameter:
      index - index in byte array for the first byte
      value - integer (four bytes) to write into byte array
    • toBytes

      public byte[] toBytes()
    • toBytes

      public byte[] toBytes(int start, int end)