public byte byteAt(int i) {

    if (i < 0) {
      throw new IndexOutOfBoundsException("i < 0, " + i);
    }

    if (i >= length) {
      throw new IndexOutOfBoundsException("i >= length, " + i + " >= " + length);
    }

    return data[offset + i];
  }
public byte byteAt ( int i ) { if ( i < 0 ) { throw new IndexOutOfBoundsException ( "i < 0, " + i ) ; } if ( i >= length ) { throw new IndexOutOfBoundsException ( "i >= length, " + i + " >= " + length ) ; } return data [ offset + i ] ; }
Gets a byte within this sequence of bytes

@param i index into sequence
@return byte
@throws IllegalArgumentException if i is out of range