Interface Bytez

All Superinterfaces:
BasicBytez, ByteSink, ByteSource
All Known Implementing Classes:
HeapBytez, MallocBytez, MemoryBytez, MMFBytez

public interface Bytez extends BasicBytez
abstraction of byte arrays similar to ByteBuffer without the need to create temp objects in order to get long,int,.. views additionally supports volatile read/write (for byte[] based backing buffers only !)
  • Method Details

    • slice

      Bytez slice(long off, int len)
    • compareAndSwapInt

      boolean compareAndSwapInt(long offset, int expect, int newVal)
    • compareAndSwapLong

      boolean compareAndSwapLong(long offset, long expect, long newVal)
    • toBytes

      byte[] toBytes(long startIndex, int len)
    • asByteArray

      byte[] asByteArray()
      Returns:
      return the underlying byte array, not supported by MallocBytez !. Use getArr to extract data by copy instead.
    • getBAOffsetIndex

      int getBAOffsetIndex()
      Returns:
      the start index inside the byte array returned by asByteArray, not supported by MallocBytez
    • getBALength

      int getBALength()
      Returns:
      the length inside the byte array returned by asByteArray, not supported by MallocBytez