DefaultDataSourceFactory


@UnstableApi
class DefaultDataSourceFactory : DataSource.Factory


Summary

Public constructors

Creates an instance.

DefaultDataSourceFactory(
    context: Context!,
    baseDataSourceFactory: DataSource.Factory!
)

Creates an instance.

DefaultDataSourceFactory(context: Context!, userAgent: String?)

Creates an instance.

DefaultDataSourceFactory(
    context: Context!,
    listener: TransferListener?,
    baseDataSourceFactory: DataSource.Factory!
)

Creates an instance.

DefaultDataSourceFactory(
    context: Context!,
    userAgent: String?,
    listener: TransferListener?
)

Creates an instance.

Public functions

DefaultDataSource!

Creates a DataSource instance.

Public constructors

DefaultDataSourceFactory

DefaultDataSourceFactory(context: Context!)

Creates an instance.

Parameters
context: Context!

A context.

DefaultDataSourceFactory

DefaultDataSourceFactory(
    context: Context!,
    baseDataSourceFactory: DataSource.Factory!
)

Creates an instance.

Parameters
context: Context!

A context.

baseDataSourceFactory: DataSource.Factory!

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

DefaultDataSourceFactory

DefaultDataSourceFactory(context: Context!, userAgent: String?)

Creates an instance.

Parameters
context: Context!

A context.

userAgent: String?

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

DefaultDataSourceFactory

DefaultDataSourceFactory(
    context: Context!,
    listener: TransferListener?,
    baseDataSourceFactory: DataSource.Factory!
)

Creates an instance.

Parameters
context: Context!

A context.

listener: TransferListener?

An optional listener.

baseDataSourceFactory: DataSource.Factory!

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

DefaultDataSourceFactory

DefaultDataSourceFactory(
    context: Context!,
    userAgent: String?,
    listener: TransferListener?
)

Creates an instance.

Parameters
context: Context!

A context.

userAgent: String?

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

listener: TransferListener?

An optional listener.

Public functions

createDataSource

fun createDataSource(): DefaultDataSource!

Creates a DataSource instance.