Class InputReaderAdapterV30
- java.lang.Object
-
- com.google.android.exoplayer2.source.mediaparser.InputReaderAdapterV30
-
- All Implemented Interfaces:
MediaParser.InputReader
,MediaParser.SeekableInputReader
@RequiresApi(30) public final class InputReaderAdapterV30 extends Object implements MediaParser.SeekableInputReader
MediaParser.SeekableInputReader
implementation wrapping aDataReader
.
-
-
Constructor Summary
Constructors Constructor Description InputReaderAdapterV30()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAndResetSeekPosition()
Returns the last value passed toseekToPosition(long)
and sets the stored value toC.POSITION_UNSET
.long
getLength()
long
getPosition()
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 wrappedDataReader
reads.void
setDataReader(DataReader dataReader, long length)
Sets the wrappedDataReader
.
-
-
-
Method Detail
-
setDataReader
public void setDataReader(DataReader dataReader, long length)
Sets the wrappedDataReader
.- Parameters:
dataReader
- TheDataReader
to wrap.length
- The length of the resource from whichdataReader
reads.
-
setCurrentPosition
public void setCurrentPosition(long position)
Sets the absolute position in the resource from which the wrappedDataReader
reads.
-
getAndResetSeekPosition
public long getAndResetSeekPosition()
Returns the last value passed toseekToPosition(long)
and sets the stored value toC.POSITION_UNSET
.
-
seekToPosition
public void seekToPosition(long position)
- Specified by:
seekToPosition
in interfaceMediaParser.SeekableInputReader
-
read
public int read(byte[] bytes, int offset, int readLength) throws IOException
- Specified by:
read
in interfaceMediaParser.InputReader
- Throws:
IOException
-
getPosition
public long getPosition()
- Specified by:
getPosition
in interfaceMediaParser.InputReader
-
getLength
public long getLength()
- Specified by:
getLength
in interfaceMediaParser.InputReader
-
-