code: private void positionDirect(long p) throws IOException {
          long newBlockStart = p / buffer.length * buffer.length;
          input.position(newBlockStart);
          buffer();
          offset = (int)(p % buffer.length);        
      }
docs: Positions the underlying stream at the given position, then refills
  the buffer.
  
  @param p  the position to set
  @throws IOException  if an IO error occurs