ParserException


@UnstableApi
class ParserException : IOException

Known direct subclasses
SsManifestParser.MissingFieldException

Thrown if a required field is missing.

UnrecognizedInputFormatException

Thrown if the input format was not recognized.


Thrown when an error occurs parsing media data and metadata.

Summary

Protected constructors

ParserException(
    message: String?,
    cause: Throwable?,
    contentIsMalformed: Boolean,
    @C.DataType dataType: Int
)

Public functions

java-static ParserException!

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MEDIA.

java-static ParserException!

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_UNKNOWN.

java-static ParserException!

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MANIFEST.

java-static ParserException!
createForManifestWithUnsupportedFeature(
    message: String?,
    cause: Throwable?
)

Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MANIFEST.

java-static ParserException!

Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MEDIA.

String?

Public properties

Boolean

Whether the parsing error was caused by a bitstream not following the expected format.

Int

The data type of the parsed bitstream.

Inherited functions

From java.lang.Throwable

Protected constructors

ParserException

protected ParserException(
    message: String?,
    cause: Throwable?,
    contentIsMalformed: Boolean,
    @C.DataType dataType: Int
)

Public functions

createForMalformedContainer

java-static fun createForMalformedContainer(message: String?, cause: Throwable?): ParserException!

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MEDIA.

Parameters
message: String?

See getMessage.

cause: Throwable?

See getCause.

Returns
ParserException!

The created instance.

createForMalformedDataOfUnknownType

java-static fun createForMalformedDataOfUnknownType(message: String?, cause: Throwable?): ParserException!

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_UNKNOWN.

Parameters
message: String?

See getMessage.

cause: Throwable?

See getCause.

Returns
ParserException!

The created instance.

createForMalformedManifest

java-static fun createForMalformedManifest(message: String?, cause: Throwable?): ParserException!

Creates a new instance for which contentIsMalformed is true and dataType is DATA_TYPE_MANIFEST.

Parameters
message: String?

See getMessage.

cause: Throwable?

See getCause.

Returns
ParserException!

The created instance.

createForManifestWithUnsupportedFeature

java-static fun createForManifestWithUnsupportedFeature(
    message: String?,
    cause: Throwable?
): ParserException!

Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MANIFEST.

Parameters
message: String?

See getMessage.

cause: Throwable?

See getCause.

Returns
ParserException!

The created instance.

createForUnsupportedContainerFeature

java-static fun createForUnsupportedContainerFeature(message: String?): ParserException!

Creates a new instance for which contentIsMalformed is false and dataType is DATA_TYPE_MEDIA.

Parameters
message: String?

See getMessage.

Returns
ParserException!

The created instance.

getMessage

fun getMessage(): String?

Public properties

contentIsMalformed

val contentIsMalformedBoolean

Whether the parsing error was caused by a bitstream not following the expected format. May be false when a parser encounters a legal condition which it does not support.

dataType

val dataTypeInt

The data type of the parsed bitstream.