code: public long skip(long n) throws IOException {
          int bytesLeft;
  
          if (n <= 0) {
              return 0;
          }
  
          bytesLeft = fLength - fOffset;
  
          // If end of buffer is reached, using `skip()` of the underlying input
          // stream
          if (bytesLeft == 0) {
              if (fOffset == fEndOffset) {
                  return 0;
              }
  
              return fInputStream.skip(n);
          }
  
          // Quickly "skipping" bytes in the buffer by modifying its pointer.
          if (n <= bytesLeft) {
              fOffset += n;
  
              return n;
          }
  
          fOffset += bytesLeft;
  
          if (fOffset == fEndOffset) {
              return bytesLeft;
          }
  
          n -= bytesLeft;
  
          return fInputStream.skip(n) + bytesLeft;
      }
docs: Skips over and discards <code>n</code> bytes of data from this input stream. The skip method
  may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly
  <code>0</code>. The actual number of bytes skipped is returned. If <code>n</code> is
  negative, no bytes are skipped.
  
  @param n Number of bytes to be skipped.
  @return Number of bytes actually skipped.
  @throws IOException if an I/O error occurs.