docs/doc/reference/com/google/android/exoplayer2/testutil/FailOnCloseDataSink.Factory.html
Package com.google.android.exoplayer2.testutil
All Implemented Interfaces:DataSink.FactoryEnclosing class:FailOnCloseDataSink
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.
Constructors | Constructor | Description |
| --- | --- |
| Factory(Cache cache, AtomicBoolean failOnClose) |
Creates an instance.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| DataSink | createDataSink() |
Creates a DataSink instance.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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.
-
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