ExceptionCatchingInputStream

open class ExceptionCatchingInputStream : InputStream

An java.io.InputStream that catches java.io.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 can return partially decoded bitmaps.

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

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.

Functions

Link copied to clipboard
open fun available(): Int
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun mark(readLimit: Int)
Link copied to clipboard
open fun markSupported(): Boolean
Link copied to clipboard
open fun nullInputStream(): InputStream
Link copied to clipboard
open fun obtain(toWrap: InputStream): ExceptionCatchingInputStream
Link copied to clipboard
open fun read(): Int
open fun read(buffer: Array<Byte>): Int
open fun read(    buffer: Array<Byte>,     byteOffset: Int,     byteCount: Int): Int
Link copied to clipboard
open fun readAllBytes(): Array<Byte>
Link copied to clipboard
open fun readNBytes(len: Int): Array<Byte>
open fun readNBytes(    b: Array<Byte>,     off: Int,     len: Int): Int
Link copied to clipboard
open fun release()
Link copied to clipboard
open fun reset()
Link copied to clipboard
open fun skip(byteCount: Long): Long
Link copied to clipboard
open fun transferTo(out: OutputStream): Long

Properties

Link copied to clipboard
open val exception: IOException