Added in API level 28

DecodeException


class DecodeException : IOException
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ java.io.IOException
   ↳ android.graphics.ImageDecoder.DecodeException

Information about an interrupted decode.

Summary

Constants
static Int

An Exception was thrown reading the Source.

static Int

The encoded data was incomplete.

static Int

The encoded data contained an error.

Public methods
Int

Retrieve the reason that decoding was interrupted.

ImageDecoder.Source

Retrieve the Source that was interrupted.

Constants

SOURCE_EXCEPTION

Added in API level 28
static val SOURCE_EXCEPTION: Int

An Exception was thrown reading the Source.

Value: 1

SOURCE_INCOMPLETE

Added in API level 28
static val SOURCE_INCOMPLETE: Int

The encoded data was incomplete.

Value: 2

SOURCE_MALFORMED_DATA

Added in API level 28
static val SOURCE_MALFORMED_DATA: Int

The encoded data contained an error.

Value: 3

Public methods

getSource

Added in API level 28
fun getSource(): ImageDecoder.Source

Retrieve the Source that was interrupted.

This can be used for equality checking to find the Source which failed to completely decode.

Return
ImageDecoder.Source This value cannot be null.