def rewind
      fail IOError, "closed stream" if closed?
      fail IOError, "this Down::ChunkedIO is not rewindable" if cache.nil?

      cache.rewind
      @position = 0
    end
def rewind
      fail IOError, "closed stream" if closed?
      fail IOError, "this Down::ChunkedIO is not rewindable" if cache.nil?

      cache.rewind
      @position = 0
    end
Implements IO#rewind semantics. Rewinds the Down::ChunkedIO by rewinding
 the cache and setting the position to the beginning of the file. Raises
 IOError if closed or not rewindable.