Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/media/MediaParser.SeekableInputReader#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/MediaParser.SeekableInputReader#inhmethods)

# MediaParser.SeekableInputReader

*** ** * ** ***


`
public
static


interface
MediaParser.SeekableInputReader
`


`


implements

https://developer.android.com/reference/android/media/MediaParser.InputReader


`

|---|
| android.media.MediaParser.SeekableInputReader |

<br />

*** ** * ** ***

`https://developer.android.com/reference/android/media/MediaParser.InputReader` that allows setting the read position.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/media/MediaParser.SeekableInputReader#seekToPosition(long)(long position) ` Sets the read position at the given `position`. |

| ### Inherited methods |
|---|---|
| From interface ` https://developer.android.com/reference/android/media/MediaParser.InputReader ` |---|---| | ` abstract long` | ` https://developer.android.com/reference/android/media/MediaParser.InputReader#getLength()() ` Returns the length of the input in bytes, or -1 if the length is unknown. | | ` abstract long` | ` https://developer.android.com/reference/android/media/MediaParser.InputReader#getPosition()() ` Returns the current read position (byte offset) in the stream. | | ` abstract int` | ` https://developer.android.com/reference/android/media/MediaParser.InputReader#read(byte[],%20int,%20int)(byte[] buffer, int offset, int readLength) ` Reads up to `readLength` bytes of data and stores them into `buffer`, starting at index `offset`. | ||

## Public methods

### seekToPosition

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void seekToPosition (long position)
```

Sets the read position at the given `position`.

`https://developer.android.com/reference/android/media/MediaParser#advance(android.media.MediaParser.SeekableInputReader)` will immediately return after calling this method.

<br />

| Parameters ||
|---|---|
| `position` | `long`: The position to seek to, in bytes. <br /> |