@Override
    public synchronized long skip(long byteCount) throws IOException {
        // Use local refs since buf and in may be invalidated by an unsynchronized close()
        byte[] localBuf = buf;
        InputStream localIn = in;
        if (localBuf == null) {
            throw streamClosed();
        }
        if (byteCount < 1) {
            return 0;
        }
        if (localIn == null) {
            throw streamClosed();
        }

        if (count - pos >= byteCount) {
            pos += byteCount;
            return byteCount;
        }
        long read = count - pos;
        pos = count;

        if (markpos != -1 && byteCount <= marklimit) {
            if (fillbuf(localIn, localBuf) == -1) {
                return read;
            }
            if (count - pos >= byteCount - read) {
                pos += byteCount - read;
                return byteCount;
            }
            // Couldn't get all the bytes, skip what we read.
            read = read + count - pos;
            pos = count;
            return read;
        }
        return read + localIn.skip(byteCount - read);
    }
Skips {@code byteCount} bytes in this stream. Subsequent calls to
{@link #read} will not return these bytes unless {@link #reset} is
used.

@param byteCount
           the number of bytes to skip. {@link #skip} does nothing and
           returns 0 if {@code byteCount} is less than zero.
@return the number of bytes actually skipped.
@throws IOException
            if this stream is closed or another IOException occurs.
core/src/main/java/com/bumptech/glide/load/resource/bitmap/RecyclableBufferedInputStream.java