InputReaderAdapterV30


@RequiresApi(value = 30)
@UnstableApi
class InputReaderAdapterV30 : MediaParser.SeekableInputReader


MediaParser.SeekableInputReader implementation wrapping a DataReader.

Summary

Public constructors

Public functions

Long

Returns the last value passed to seekToPosition and sets the stored value to INDEX_UNSET.

Long
Long
Int
read(bytes: ByteArray!, offset: Int, readLength: Int)
Unit
seekToPosition(position: Long)
Unit

Sets the absolute position in the resource from which the wrapped DataReader reads.

Unit
setDataReader(dataReader: DataReader!, length: Long)

Sets the wrapped DataReader.

Public constructors

InputReaderAdapterV30

InputReaderAdapterV30()

Public functions

getAndResetSeekPosition

fun getAndResetSeekPosition(): Long

Returns the last value passed to seekToPosition and sets the stored value to INDEX_UNSET.

getLength

fun getLength(): Long

getPosition

fun getPosition(): Long

read

fun read(bytes: ByteArray!, offset: Int, readLength: Int): Int

seekToPosition

fun seekToPosition(position: Long): Unit

setCurrentPosition

fun setCurrentPosition(position: Long): Unit

Sets the absolute position in the resource from which the wrapped DataReader reads.

setDataReader

fun setDataReader(dataReader: DataReader!, length: Long): Unit

Sets the wrapped DataReader.

Parameters
dataReader: DataReader!

The DataReader to wrap.

length: Long

The length of the resource from which dataReader reads.