code: public int available() throws IOException {
          int bytesLeft = fLength - fOffset;
  
          if (bytesLeft == 0) {
              // Again, the same thing as in `read()`. Do we need to throw
              // an exception if fOffset > fEndOffset???
              if (fOffset == fEndOffset) {
                  return -1;
              }
  
              /*
               * In a manner of speaking, when this class isn't permitting more
               * than one byte at a time to be read, it is "blocking".  The
               * available() method should indicate how much can be read without
               * blocking, so while we're in this mode, it should only indicate
               * that bytes in its buffer are available; otherwise, the result of
               * available() on the underlying InputStream is appropriate.
               */
              return fMayReadChunks ? fInputStream.available() : 0;
          }
  
          return bytesLeft;
      }
docs: Returns the number of bytes that can be read (or skipped over) from this input stream without
  blocking by the next caller of a method for this input stream. For <code>
  RewindableInputStream</code> this can be:
  
  <ul>
  <li>Number of unread bytes in the <code>fData</code> buffer, i.e. those between current
  position (fOffset) and total bytes quantity in the buffer (fLength).
  <li>Result of underlying InputStream's <code>available</code> call if there are no unread
  bytes in the buffer.
  <li><code>-1</code> if end of stream is reached.
  </ul>
  
  @return the number of bytes that can be read from this input stream without blocking.
  @throws IOException when an I/O error occurs.