public static ExceptionCatchingInputStream obtain(InputStream toWrap) {
        ExceptionCatchingInputStream result;
        synchronized (QUEUE) {
            result = QUEUE.poll();
        }
        if (result == null) {
            result = new ExceptionCatchingInputStream();
        }
        result.setInputStream(toWrap);
        return result;
    }
An {@link InputStream} that catches {@link IOException}s during read and skip calls and stores them
so they can later be handled or thrown. This class is a workaround for a framework issue where exceptions during
reads while decoding bitmaps in {@link android.graphics.BitmapFactory} can return partially decoded bitmaps.

See https://github.com/bumptech/glide/issues/126.
core/src/main/java/com/bumptech/glide/util/ExceptionCatchingInputStream.java