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.SeekableInputReaderimplementation wrapping aDataReader.
-
-
Constructor Summary
Constructors Constructor Description InputReaderAdapterV30()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAndResetSeekPosition()Returns the last value passed toseekToPosition(long)and sets the stored value toC.POSITION_UNSET.longgetLength()longgetPosition()intread(byte[] bytes, int offset, int readLength)voidseekToPosition(long position)voidsetCurrentPosition(long position)Sets the absolute position in the resource from which the wrappedDataReaderreads.voidsetDataReader(DataReader dataReader, long length)Sets the wrappedDataReader.
-
-
-
Method Detail
-
setDataReader
public void setDataReader(DataReader dataReader, long length)
Sets the wrappedDataReader.- Parameters:
dataReader- TheDataReaderto wrap.length- The length of the resource from whichdataReaderreads.
-
setCurrentPosition
public void setCurrentPosition(long position)
Sets the absolute position in the resource from which the wrappedDataReaderreads.
-
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:
seekToPositionin interfaceMediaParser.SeekableInputReader
-
read
public int read(byte[] bytes, int offset, int readLength) throws IOException- Specified by:
readin interfaceMediaParser.InputReader- Throws:
IOException
-
getPosition
public long getPosition()
- Specified by:
getPositionin interfaceMediaParser.InputReader
-
getLength
public long getLength()
- Specified by:
getLengthin interfaceMediaParser.InputReader
-
-