/** * @return the index after the last byte that can be accessed. */ public final int last() { return cba.last(); }
/** * {@inheritDoc} */ @Override public int getRemaining() { return last() - index + 1; }
/** * @return the index after the last byte that can be accessed. */ public final int last() { return cba.last(); }
/** * {@inheritDoc} */ @Override public int getRemaining() { return last() - index + 1; }
/** * Get the index after the last byte that can be accessed. */ public final int last() { return cba.last(); }
/** * @inheritDoc */ public int getRemaining() { return last() - index + 1; }
private void checkBounds(int index, int accessSize) { int lower = index; int upper = index + accessSize; if (lower < first()) { throw new IndexOutOfBoundsException("Index " + lower + " less than start " + first() + "."); } if (upper > last()) { throw new IndexOutOfBoundsException("Index " + upper + " greater than length " + last() + "."); } } }
private void checkBounds(int index, int accessSize) { int lower = index; int upper = index + accessSize; if (lower < first()) { throw new IndexOutOfBoundsException("Index " + lower + " less than start " + first() + "."); } if (upper > last()) { throw new IndexOutOfBoundsException("Index " + upper + " greater than length " + last() + "."); } } }
private void checkBounds( int index, int accessSize ) { int lower = index; int upper = index + accessSize; if ( lower < first() ) { throw new IndexOutOfBoundsException( "Index " + lower + " less than start " + first() + "." ); } if ( upper > last() ) { throw new IndexOutOfBoundsException( "Index " + upper + " greater than length " + last() + "." ); } }
int actualLength = last() - first();
int actualLength = last() - first();
int actualLength = last() - first();
if (index < first() || index > last()) { throw new IndexOutOfBoundsException();
if (index < first() || index > last()) { throw new IndexOutOfBoundsException();
if ( index < first() || index > last() ) { throw new IndexOutOfBoundsException();