Interface IoRelativeReader

All Known Subinterfaces:
ByteArray.Cursor
All Known Implementing Classes:
BufferByteArray.CursorImpl, CompositeByteArray.CursorImpl, CompositeByteArrayRelativeReader

public interface IoRelativeReader
Provides relative read access to a sequence of bytes.
  • Method Details

    • getRemaining

      int getRemaining()
      Returns:
      the number of remaining bytes that can be read.
    • hasRemaining

      boolean hasRemaining()
      Checks if there are any remaining bytes that can be read.
      Returns:
      true if there are some remaining bytes in the buffer
    • skip

      void skip(int length)
      Advances the reader by the given number of bytes.
      Parameters:
      length - the number of bytes to skip
    • slice

      ByteArray slice(int length)
      Parameters:
      length - The number of bytes to get
      Returns:
      an array with a view of part of this array.
    • order

      ByteOrder order()
      Returns:
      the bytes' order
    • get

      byte get()
      Returns:
      the byte at the current position and advances the reader.
    • get

      void get(IoBuffer bb)
      Gets enough bytes to fill the IoBuffer and advances the reader.
      Parameters:
      bb - The IoBuffer that will contain the read bytes
    • getShort

      short getShort()
      Returns:
      a short and advances the reader.
    • getInt

      int getInt()
      Returns:
      an int and advances the reader.
    • getLong

      long getLong()
      Returns:
      a long and advances the reader.
    • getFloat

      float getFloat()
      Returns:
      a float and advances the reader.
    • getDouble

      double getDouble()
      Returns:
      a double and advances the reader.
    • getChar

      char getChar()
      Returns:
      a char and advances the reader.