Package com.google.android.exoplayer2.source.mediaparser

## Class InputReaderAdapterV30

- java.lang.Object
- - com.google.android.exoplayer2.source.mediaparser.InputReaderAdapterV30

- All Implemented Interfaces:
    `MediaParser.InputReader`, `MediaParser.SeekableInputReader`

      public final class InputReaderAdapterV30
      extends Object
      implements MediaParser.SeekableInputReader

  `MediaParser.SeekableInputReader` implementation wrapping a `DataReader`.

- - ### 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 to `seekToPosition(long)` and sets the stored value to `C.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 wrapped `DataReader` reads.
    `void` | `setDataReader​(DataReader dataReader, long length)` | Sets the wrapped `DataReader`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InputReaderAdapterV30

          public InputReaderAdapterV30()

  - ### Method Detail

    - #### setDataReader

          public void setDataReader​(DataReader dataReader,
                                    long length)

      Sets the wrapped `DataReader`.
      Parameters:
        `dataReader` - The `DataReader` to wrap.
        `length` - The length of the resource from which `dataReader` reads.

    - #### setCurrentPosition

          public void setCurrentPosition​(long position)

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

    - #### getAndResetSeekPosition

          public long getAndResetSeekPosition()

      Returns the last value passed to `seekToPosition(long)` and sets the stored value to `C.POSITION_UNSET`.

    - #### seekToPosition

          public void seekToPosition​(long position)

      Specified by:
        `seekToPosition` in interface `MediaParser.SeekableInputReader`

    - #### read

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

      Specified by:
        `read` in interface `MediaParser.InputReader`
      Throws:
        `IOException`

    - #### getPosition

          public long getPosition()

      Specified by:
        `getPosition` in interface `MediaParser.InputReader`

    - #### getLength

          public long getLength()

      Specified by:
        `getLength` in interface `MediaParser.InputReader`