Package com.bumptech.glide.util
Class ExceptionCatchingInputStream
java.lang.Object
java.io.InputStream
com.bumptech.glide.util.ExceptionCatchingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Deprecated.
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.
-
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.voidclose()Deprecated.Deprecated.voidmark(int readLimit) Deprecated.booleanDeprecated.static ExceptionCatchingInputStreamobtain(InputStream toWrap) Deprecated.intread()Deprecated.intread(byte[] buffer) Deprecated.intread(byte[] buffer, int byteOffset, int byteCount) Deprecated.voidrelease()Deprecated.voidreset()Deprecated.longskip(long byteCount) Deprecated.Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Method Details
-
obtain
Deprecated. -
available
Deprecated.- Overrides:
availablein classInputStream- Throws:
IOException
-
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readLimit) Deprecated.- Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()Deprecated.- Overrides:
markSupportedin classInputStream
-
read
public int read(byte[] buffer) Deprecated.- Overrides:
readin classInputStream
-
read
public int read(byte[] buffer, int byteOffset, int byteCount) Deprecated.- Overrides:
readin classInputStream
-
reset
Deprecated.- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
public long skip(long byteCount) Deprecated.- Overrides:
skipin classInputStream
-
read
public int read()Deprecated.- Specified by:
readin classInputStream
-
getException
Deprecated. -
release
public void release()Deprecated.
-
ExceptionPassthroughInputStreaminstead. This class will be deleted in a future version of Glide.