InputReaderAdapterV30


@RequiresApi(value = 30)
@UnstableApi
public final class InputReaderAdapterV30 implements MediaParser.SeekableInputReader


MediaParser.SeekableInputReader implementation wrapping a DataReader.

Summary

Public constructors

Public methods

long

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

long
long
int
read(byte[] bytes, int offset, int readLength)
void
seekToPosition(long position)
void
setCurrentPosition(long position)

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

void
setDataReader(DataReader dataReader, long length)

Sets the wrapped DataReader.

Public constructors

InputReaderAdapterV30

public InputReaderAdapterV30()

Public methods

getAndResetSeekPosition

public long getAndResetSeekPosition()

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

getLength

public long getLength()

getPosition

public long getPosition()

read

public int read(byte[] bytes, int offset, int readLength)

seekToPosition

public void seekToPosition(long position)

setCurrentPosition

public void setCurrentPosition(long position)

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

setDataReader

public void setDataReader(DataReader dataReader, long length)

Sets the wrapped DataReader.

Parameters
DataReader dataReader

The DataReader to wrap.

long length

The length of the resource from which dataReader reads.