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 |
The extraction of the gainmap component of the image failed. |
| static Int |
An Exception was thrown reading the |
| static Int |
The encoded data was incomplete. |
| static Int |
The encoded data contained an error. |
| Public methods | |
|---|---|
| Int |
getError()Retrieve the reason that decoding was interrupted. |
| ImageDecoder.Source |
Retrieve the |
Constants
GAINMAP_EXTRACTION_FAILED
static val GAINMAP_EXTRACTION_FAILED: Int
The extraction of the gainmap component of the image failed. If the partially decoded result is returned by returning true from OnPartialImageListener.onPartialImage(DecodeException) there will still be a complete base image to be viewed. It is thus recommended to return the partial image and proceed with displaying it. Applications that are doing this for editing or similar may want to consider warning the user that data was lost.
Value: 4SOURCE_EXCEPTION
static val SOURCE_EXCEPTION: Int
An Exception was thrown reading the Source.
Value: 1SOURCE_INCOMPLETE
static val SOURCE_INCOMPLETE: Int
The encoded data was incomplete.
Value: 2SOURCE_MALFORMED_DATA
static val SOURCE_MALFORMED_DATA: Int
The encoded data contained an error.
Value: 3Public methods
getError
fun getError(): Int
Retrieve the reason that decoding was interrupted.
If the error is SOURCE_EXCEPTION, the underlying java.lang.Throwable can be retrieved with java.lang.Throwable#getCause.
| Return | |
|---|---|
Int |
Value is one of the following: |
getSource
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. |