Class ExceptionCatchingInputStream

java.lang.Object
java.io.InputStream
com.bumptech.glide.util.ExceptionCatchingInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

@Deprecated public class ExceptionCatchingInputStream extends InputStream
Deprecated.
In some cases, callers may not handle getting 0 or -1 return values from methods, which can lead to infinite loops (see #4438). Use ExceptionPassthroughInputStream instead. This class will be deleted in a future version of Glide.
An InputStream that catches IOExceptions 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 BitmapFactory can return partially decoded bitmaps.

See https://github.com/bumptech/glide/issues/126.