MediaDataSource.ReadAt(Int64, Byte[], Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called to request data from the given position.
[Android.Runtime.Register("readAt", "(J[BII)I", "GetReadAt_JarrayBIIHandler", ApiSince=23)]
public abstract int ReadAt (long position, byte[]? buffer, int offset, int size);
[<Android.Runtime.Register("readAt", "(J[BII)I", "GetReadAt_JarrayBIIHandler", ApiSince=23)>]
abstract member ReadAt : int64 * byte[] * int * int -> int
Parameters
- position
- Int64
the position in the data source to read from.
- buffer
- Byte[]
the buffer to read the data into.
- offset
- Int32
the offset within buffer to read the data into.
- size
- Int32
the number of bytes to read.
Returns
the number of bytes read, or -1 if end of stream is reached.
- Attributes
Remarks
Called to request data from the given position.
Implementations should fill buffer
with up to size
bytes of data, and return the number of valid bytes in the buffer.
Return 0
if size is zero (thus no bytes are read).
Return -1
to indicate that end of stream is reached.
Java documentation for android.media.MediaDataSource.readAt(long, byte[], int, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.