androidx.media3.datasource


Interfaces

ByteArrayDataSource.UriResolver

Functional interface to resolve from Uri to byte[].

DataSink

A component to which streams of data can be written.

DataSink.Factory

A factory for DataSink instances.

DataSource

Reads data from URI-identified resources.

DataSource.Factory

A factory for DataSource instances.

HttpDataSource

An HTTP DataSource.

HttpDataSource.Factory

A factory for HttpDataSource instances.

ResolvingDataSource.Resolver

Resolves DataSpecs.

TransferListener

A listener of data transfer events.

Classes

AesCipherDataSink

A wrapping DataSink that encrypts the data being consumed.

AesCipherDataSource

A DataSource that decrypts the data read from an upstream source.

AesFlushingCipher

A flushing variant of a AES/CTR/NoPadding Cipher.

AssetDataSource

A DataSource for reading from a local asset.

BaseDataSource

Base DataSource implementation to keep a list of TransferListeners.

BitmapUtil

Utility methods for Bitmap instances.

ByteArrayDataSink

A DataSink for writing to a byte array.

ByteArrayDataSource

A DataSource for reading from a byte array.

ContentDataSource

A DataSource for reading from a content URI.

DataSchemeDataSource

A DataSource for reading data URLs, as defined by RFC 2397.

DataSourceBitmapLoader

A BitmapLoader implementation that uses a DataSource to support fetching images from URIs and BitmapFactory to load them into Bitmap.

DataSourceInputStream

Allows data corresponding to a given DataSpec to be read from a DataSource and consumed through an InputStream.

DataSourceUtil

Utility methods for DataSource.

DataSpec

Defines a region of data in a resource.

DataSpec.Builder

Builds DataSpec instances.

DefaultDataSource

A DataSource that supports multiple URI schemes.

DefaultDataSource.Factory

DataSource.Factory for DefaultDataSource instances.

DefaultDataSourceFactory

This class is deprecated.

Use DefaultDataSource.Factory instead.

DefaultHttpDataSource

An HttpDataSource that uses Android's HttpURLConnection.

DefaultHttpDataSource.Factory

DataSource.Factory for DefaultHttpDataSource instances.

FileDataSource

A DataSource for reading local files.

FileDataSource.Factory

DataSource.Factory for FileDataSource instances.

FileDescriptorDataSource

A DataSource for reading from a FileDescriptor.

HttpDataSource.BaseFactory

Base implementation of Factory that sets default request properties.

HttpDataSource.RequestProperties

Stores HTTP request properties (aka HTTP headers) and provides methods to modify the headers in a thread safe way to avoid the potential of creating snapshots of an inconsistent or unintended state.

HttpEngineDataSource

DataSource without intermediate buffer based on HttpEngine set using UrlRequest.

HttpEngineDataSource.Factory

DataSource.Factory for HttpEngineDataSource instances.

HttpUtil

Utility methods for HTTP.

MediaDataSourceAdapter

A DataSource for reading from a MediaDataSource.

PlaceholderDataSource

A DataSource which provides no data.

PriorityDataSource

A DataSource that can be used as part of a task registered with a .

PriorityDataSource.Factory

DataSource.Factory for PriorityDataSource instances.

PriorityDataSourceFactory

This class is deprecated.

Use PriorityDataSource.Factory.

RawResourceDataSource

A DataSource for reading a raw resource.

ResolvingDataSource

DataSource wrapper allowing just-in-time resolution of DataSpecs.

ResolvingDataSource.Factory

DataSource.Factory for ResolvingDataSource instances.

StatsDataSource

DataSource wrapper which keeps track of bytes transferred, redirected uris, and response headers.

TeeDataSource

Tees data into a DataSink as the data is read.

UdpDataSource

A UDP DataSource.

Exceptions

AssetDataSource.AssetDataSourceException

Thrown when an IOException is encountered reading a local asset.

ContentDataSource.ContentDataSourceException

Thrown when an IOException is encountered reading from a content URI.

DataSourceException

Used to specify reason of a DataSource error.

FileDataSource.FileDataSourceException

Thrown when a FileDataSource encounters an error reading a file.

HttpDataSource.CleartextNotPermittedException

Thrown when cleartext HTTP traffic is not permitted.

HttpDataSource.HttpDataSourceException

Thrown when an error is encountered when trying to read from a HttpDataSource.

HttpDataSource.InvalidContentTypeException

Thrown when the content type is invalid.

HttpDataSource.InvalidResponseCodeException

Thrown when an attempt to open a connection results in a response code not in the 2xx range.

HttpEngineDataSource.OpenException

Thrown when an error is encountered when trying to open a HttpEngineDataSource.

RawResourceDataSource.RawResourceDataSourceException

Thrown when an IOException is encountered reading from a raw resource.

UdpDataSource.UdpDataSourceException

Thrown when an error is encountered when trying to read from a UdpDataSource.

Annotations

DataSpec.Flags

The flags that apply to any request for data.

DataSpec.HttpMethod

HTTP methods supported by ExoPlayer HttpDataSources.

HttpDataSource.HttpDataSourceException.Type

The type of operation that produced the error.