@Override
    public synchronized int available() throws IOException {
        // in could be invalidated by close().
        InputStream localIn = in;
        if (buf == null || localIn == null) {
            throw streamClosed();
        }
        return count - pos + localIn.available();
    }
Returns an estimated number of bytes that can be read or skipped without blocking for more
input. This method returns the number of bytes available in the buffer
plus those available in the source stream, but see {@link InputStream#available} for
important caveats.

@return the estimated number of bytes available
@throws IOException if this stream is closed or an error occurs
core/src/main/java/com/bumptech/glide/load/resource/bitmap/RecyclableBufferedInputStream.java