FileDocCategorySizeDatePackage
DataSource.javaAPI DocAndroid 5.1 API1337Thu Mar 12 22:22:30 GMT 2015android.media

DataSource

public interface DataSource implements Closeable
An abstraction for a media data source, e.g. a file or an http stream {@hide}

Fields Summary
Constructors Summary
Methods Summary
public longgetSize()
Gets the size of the data source.

return
size of data source, or -1 if the length is unknown

public intreadAt(long offset, byte[] buffer, int size)
Reads data from the data source at the requested position

param
offset where in the source to read
param
buffer the buffer to read the data into
param
size how many bytes to read
return
the number of bytes read, or -1 if there was an error