Interface ByteBuffer

  • All Known Implementing Classes:
    ByteBufferImpl, ByteBufferImpl

    public interface ByteBuffer
    A byte buffer that exposes the internal byte array with minimal copying. To be instantiated with ByteBufferFactory.
    Since:
    6.0
    Author:
    Mircea Markus
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ByteBuffer copy()
      Returns a new byte[] instance of size getLength() that contains all the bytes owned by this buffer.
      byte[] getBuf()
      Returns the underlying buffer.
      int getLength()
      Length bytes, starting from offset, within the underlying byte[] (as returned by getBuf() are owned by this buffer instance.
      int getOffset()
      Returns the offset within the underlying byte[] (as returned by getBuf() owned by this buffer instance.
    • Method Detail

      • getBuf

        byte[] getBuf()
        Returns the underlying buffer.
      • getOffset

        int getOffset()
        Returns the offset within the underlying byte[] (as returned by getBuf() owned by this buffer instance.
      • getLength

        int getLength()
        Length bytes, starting from offset, within the underlying byte[] (as returned by getBuf() are owned by this buffer instance.
      • copy

        ByteBuffer copy()
        Returns a new byte[] instance of size getLength() that contains all the bytes owned by this buffer.