# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods

# MediaParser.InputReader

`public static interface MediaParser.InputReader`
``

android.media.MediaParser.InputReader

Known indirect subclasses MediaParser.SeekableInputReader
MediaParser.SeekableInputReader | `InputReader` that allows setting the read position.

Provides input data to `MediaParser`.

## Summary

### Public methods
`abstract long` | `getLength()` Returns the length of the input in bytes, or -1 if the length is unknown.
`abstract long` | `getPosition()` Returns the current read position (byte offset) in the stream.
`abstract int` | `read(byte[] buffer, int offset, int readLength)` Reads up to `readLength` bytes of data and stores them into `buffer`, starting at index `offset`.

## Public methods

### getLength

    public abstract long getLength ()

Returns the length of the input in bytes, or -1 if the length is unknown.

Returns
`long` |

### getPosition

    public abstract long getPosition ()

Returns the current read position (byte offset) in the stream.

Returns
`long` |

### read

    public abstract int read (byte[] buffer,
                    int offset,
                    int readLength)

Reads up to `readLength` bytes of data and stores them into `buffer`, starting at index `offset`.

This method blocks until at least one byte is read, the end of input is detected, or an exception is thrown. The read position advances to the first unread byte.

Parameters
`buffer` | `byte`: The buffer into which the read data should be stored. This value cannot be `null`.
`offset` | `int`: The start offset into `buffer` at which data should be written.
`readLength` | `int`: The maximum number of bytes to read.

Returns
`int` | The non-zero number of bytes read, or -1 if no data is available because the end of the input has been reached.

Throws
`IOException` | If an error occurs reading from the source.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*