DefaultDataSourceFactory


@UnstableApi
public final class DefaultDataSourceFactory implements DataSource.Factory


Summary

Public constructors

Creates an instance.

DefaultDataSourceFactory(
    Context context,
    DataSource.Factory baseDataSourceFactory
)

Creates an instance.

Creates an instance.

DefaultDataSourceFactory(
    Context context,
    @Nullable TransferListener listener,
    DataSource.Factory baseDataSourceFactory
)

Creates an instance.

DefaultDataSourceFactory(
    Context context,
    @Nullable String userAgent,
    @Nullable TransferListener listener
)

Creates an instance.

Public methods

DefaultDataSource

Creates a DataSource instance.

Public constructors

DefaultDataSourceFactory

public DefaultDataSourceFactory(Context context)

Creates an instance.

Parameters
Context context

A context.

DefaultDataSourceFactory

public DefaultDataSourceFactory(
    Context context,
    DataSource.Factory baseDataSourceFactory
)

Creates an instance.

Parameters
Context context

A context.

DataSource.Factory baseDataSourceFactory

A Factory to be used to create a base DataSource for DefaultDataSource.

DefaultDataSourceFactory

public DefaultDataSourceFactory(Context context, @Nullable String userAgent)

Creates an instance.

Parameters
Context context

A context.

@Nullable String userAgent

The user agent that will be used when requesting remote data, or null to use the default user agent of the underlying platform.

DefaultDataSourceFactory

public DefaultDataSourceFactory(
    Context context,
    @Nullable TransferListener listener,
    DataSource.Factory baseDataSourceFactory
)

Creates an instance.

Parameters
Context context

A context.

@Nullable TransferListener listener

An optional listener.

DataSource.Factory baseDataSourceFactory

A Factory to be used to create a base DataSource for DefaultDataSource.

DefaultDataSourceFactory

public DefaultDataSourceFactory(
    Context context,
    @Nullable String userAgent,
    @Nullable TransferListener listener
)

Creates an instance.

Parameters
Context context

A context.

@Nullable String userAgent

The user agent that will be used when requesting remote data, or null to use the default user agent of the underlying platform.

@Nullable TransferListener listener

An optional listener.

Public methods

createDataSource

public DefaultDataSource createDataSource()

Creates a DataSource instance.