org.apache.mina.util.byteaccess

## Interface ByteArray.Cursor

- All Superinterfaces:
    IoRelativeReader, IoRelativeWriter
  Enclosing interface:
    ByteArray

      public static interface ByteArray.Cursor
      extends IoRelativeReader, IoRelativeWriter

  Provides relocatable, relative access to the underlying array. Multiple cursors may be used simultaneously, and cursors will stay consistent with the underlying array, even across modifications. Should this be `Cloneable` to allow cheap mark/position emulation?

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte` | `get()` Gets a `byte` and advances the reader.
    `void` | `get(IoBuffer bb)` Gets enough bytes to fill the `IoBuffer` and advances the reader.
    `int` | `getIndex()` Gets the current index of the cursor.
    `int` | `getInt()` Gets an `int` and advances the reader.
    `int` | `getRemaining()` Gets the number of remaining bytes that can be read.
    `boolean` | `hasRemaining()` Checks if there are any remaining bytes that can be read.
    `void` | `setIndex(int index)` Sets the current index of the cursor.

    - ### Methods inherited from interface org.apache.mina.util.byteaccess.IoRelativeReader

      `getChar, getDouble, getFloat, getLong, getShort, order, skip, slice`

    - ### Methods inherited from interface org.apache.mina.util.byteaccess.IoRelativeWriter

      `order, put, put, putChar, putDouble, putFloat, putInt, putLong, putShort, skip`

- - ### Method Detail

    - #### getIndex

          int getIndex()

      Gets the current index of the cursor.

    - #### setIndex

          void setIndex(int index)

      Sets the current index of the cursor. No bounds checking will occur until an access occurs.

    - #### getRemaining

          int getRemaining()

      Description copied from interface: `IoRelativeReader`
      Gets the number of remaining bytes that can be read.
      Specified by:
        `getRemaining` in interface `IoRelativeReader`
      Specified by:
        `getRemaining` in interface `IoRelativeWriter`

    - #### hasRemaining

          boolean hasRemaining()

      Description copied from interface: `IoRelativeReader`
      Checks if there are any remaining bytes that can be read.
      Specified by:
        `hasRemaining` in interface `IoRelativeReader`
      Specified by:
        `hasRemaining` in interface `IoRelativeWriter`

    - #### get

          byte get()

      Description copied from interface: `IoRelativeReader`
      Gets a `byte` and advances the reader.
      Specified by:
        `get` in interface `IoRelativeReader`

    - #### get

          void get(IoBuffer bb)

      Description copied from interface: `IoRelativeReader`
      Gets enough bytes to fill the `IoBuffer` and advances the reader.
      Specified by:
        `get` in interface `IoRelativeReader`

    - #### getInt

          int getInt()

      Description copied from interface: `IoRelativeReader`
      Gets an `int` and advances the reader.
      Specified by:
        `getInt` in interface `IoRelativeReader`

Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.