docs/doc/reference/com/google/android/exoplayer2/testutil/DataSourceContractTest.FakeTransferListener.html
Package com.google.android.exoplayer2.testutil
All Implemented Interfaces:TransferListenerEnclosing class:DataSourceContractTest
public static classDataSourceContractTest.FakeTransferListenerextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[TransferListener](../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")
A TransferListener that only keeps track of the transferred bytes.
Constructors | Constructor | Description |
| --- | --- |
| FakeTransferListener() | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | onBytesTransferred(DataSource source, DataSpec dataSpec, boolean isNetwork, int bytesTransferred) |
Called incrementally during a transfer.
|
| void | onTransferEnd(DataSource source, DataSpec dataSpec, boolean isNetwork) |
Called when a transfer ends.
|
| void | onTransferInitializing(DataSource source, DataSpec dataSpec, boolean isNetwork) |
Called when a transfer is being initialized.
|
| void | onTransferStart(DataSource source, DataSpec dataSpec, boolean isNetwork) |
Called when a transfer starts.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public FakeTransferListener()
-
public void onTransferInitializing([DataSource](../upstream/DataSource.html "interface in com.google.android.exoplayer2.upstream")source,[DataSpec](../upstream/DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec,
boolean isNetwork)
Description copied from interface: TransferListener
Called when a transfer is being initialized.
Specified by:onTransferInitializing in interface TransferListenerParameters:source - The source performing the transfer.dataSpec - Describes the data for which the transfer is initialized.isNetwork - Whether the data is transferred through a network.
-
public void onTransferStart([DataSource](../upstream/DataSource.html "interface in com.google.android.exoplayer2.upstream")source,[DataSpec](../upstream/DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec,
boolean isNetwork)
Description copied from interface: TransferListener
Called when a transfer starts.
Specified by:onTransferStart in interface TransferListenerParameters:source - The source performing the transfer.dataSpec - Describes the data being transferred.isNetwork - Whether the data is transferred through a network.
-
public void onBytesTransferred([DataSource](../upstream/DataSource.html "interface in com.google.android.exoplayer2.upstream")source,[DataSpec](../upstream/DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec,
boolean isNetwork,
int bytesTransferred)
Description copied from interface: TransferListener
Called incrementally during a transfer.
Specified by:onBytesTransferred in interface TransferListenerParameters:source - The source performing the transfer.dataSpec - Describes the data being transferred.isNetwork - Whether the data is transferred through a network.bytesTransferred - The number of bytes transferred since the previous call to this method.
-
public void onTransferEnd([DataSource](../upstream/DataSource.html "interface in com.google.android.exoplayer2.upstream")source,[DataSpec](../upstream/DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec,
boolean isNetwork)
Description copied from interface: TransferListener
Called when a transfer ends.
Specified by:onTransferEnd in interface TransferListenerParameters:source - The source performing the transfer.dataSpec - Describes the data being transferred.isNetwork - Whether the data is transferred through a network.