org.apache.mina.util.byteaccess
Interface IoAbsoluteReader

All Known Subinterfaces:
ByteArray
All Known Implementing Classes:
BufferByteArray, CompositeByteArray

public interface IoAbsoluteReader

Provides absolute read access to a sequence of bytes.

Author:
Apache MINA Project

Method Summary
 int first()
          Get the index of the first byte that can be accessed.
 byte get(int index)
          Gets a byte from the given index.
 void get(int index, IoBuffer bb)
          Gets enough bytes to fill the IoBuffer from the given index.
 char getChar(int index)
          Gets a char from the given index.
 double getDouble(int index)
          Gets a double from the given index.
 float getFloat(int index)
          Gets a float from the given index.
 int getInt(int index)
          Gets an int from the given index.
 long getLong(int index)
          Gets a long from the given index.
 short getShort(int index)
          Gets a short from the given index.
 int last()
          Gets the index after the last byte that can be accessed.
 int length()
          Gets the total number of bytes that can be accessed.
 ByteOrder order()
          Gets the order of the bytes.
 ByteArray slice(int index, int length)
          Creates an array with a view of part of this array.
 

Method Detail

first

int first()
Get the index of the first byte that can be accessed.


last

int last()
Gets the index after the last byte that can be accessed.


length

int length()
Gets the total number of bytes that can be accessed.


slice

ByteArray slice(int index,
                int length)
Creates an array with a view of part of this array.


order

ByteOrder order()
Gets the order of the bytes.


get

byte get(int index)
Gets a byte from the given index.


get

void get(int index,
         IoBuffer bb)
Gets enough bytes to fill the IoBuffer from the given index.


getShort

short getShort(int index)
Gets a short from the given index.


getInt

int getInt(int index)
Gets an int from the given index.


getLong

long getLong(int index)
Gets a long from the given index.


getFloat

float getFloat(int index)
Gets a float from the given index.


getDouble

double getDouble(int index)
Gets a double from the given index.


getChar

char getChar(int index)
Gets a char from the given index.



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