code: public void position(long p) throws IOException {
          if ((p < 0) || (p > array.length)) {
              throw new IOException("Invalid position: " + p);
          }
          offset = (int)p;
      }
docs: Repositions the stream.
  
  @param  p  the new position for the stream
  @throws IOException if the given position is out of bounds