Back to Exoplayer

FailOnCloseDataSink.Factory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/FailOnCloseDataSink.Factory.html

latest2.9 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class FailOnCloseDataSink.Factory


public static final classFailOnCloseDataSink.Factoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[DataSink.Factory](../upstream/DataSink.Factory.html "interface in com.google.android.exoplayer2.upstream")

Factory to create a FailOnCloseDataSink.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Factory​(Cache cache, AtomicBoolean failOnClose) | Creates an instance. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | DataSink | createDataSink() | Creates a DataSink instance. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Factory

public Factory​([Cache](../upstream/cache/Cache.html "interface in com.google.android.exoplayer2.upstream.cache")cache,[AtomicBoolean](https://developer.android.com/reference/java/util/concurrent/atomic/AtomicBoolean.html "class or interface in java.util.concurrent.atomic")failOnClose)

Creates an instance. Parameters:cache - The cache to write to when not in fail-on-close mode.failOnClose - An AtomicBoolean whose value is read in each call to DataSink.open(com.google.android.exoplayer2.upstream.DataSpec) to determine whether to enable fail-on-close for the read that's being started.

Method Detail

- 

createDataSink

public[DataSink](../upstream/DataSink.html "interface in com.google.android.exoplayer2.upstream")createDataSink()

Description copied from interface: DataSink.Factory

Creates a DataSink instance. Specified by:createDataSink in interface DataSink.Factory