code: public boolean position(long pos)
      throws IOException
    {
      if (pos < 0) {
        // Return error on seek to negative stream position
  
        return false;
      }
      
      long delta = pos - position();
      
      long newOffset = _readOffset + delta;
      
      if (newOffset >= 0 && newOffset < _readLength) {
        _readOffset = (int) newOffset;
        
        return true;
      }
      
      if (delta < 0) {
        // Seek backwards in the stream
  
        _position = pos;
        _readLength = _readOffset = 0;
  
        if (_source != null) {
          _source.seekStart(pos);
  
          return true;
        }
        else {
          return false;
        }
      }
      else {
        // Seek forward in the stream, skip any buffered bytes
  
        long n = pos - position();
  
        return (skip(n) == n);
      }
    }
docs: Sets the current read position.