/** {@inheritDoc} */ public int get(long position) throws IOException { if (position < getBufferStart || position > getBufferEnd) { int count = source.get(position, getBuffer, 0, getBuffer.length); if (count == -1) return -1; getBufferStart = position; getBufferEnd = position + count - 1; } int bufPos = (int) (position - getBufferStart); return 0xff & getBuffer[bufPos]; }
/** {@inheritDoc} */ public int get(long position, byte[] bytes, int off, int len) throws IOException { return source.get(position, bytes, off, len); }