docs/doc/reference/com/google/android/exoplayer2/audio/AudioSink.WriteException.html
Package com.google.android.exoplayer2.audio
All Implemented Interfaces:SerializableEnclosing interface:AudioSink
public static final classAudioSink.WriteExceptionextends[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")
Thrown when a failure occurs writing to the sink. See Also:Serialized Form
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| int | errorCode |
The error value returned from the sink implementation.
|
| Format | format |
The input Format of the sink when the error occurs.
|
| boolean | isRecoverable |
If the exception can be recovered by recreating the sink.
|
Constructors | Constructor | Description |
| --- | --- |
| WriteException(int errorCode, Format format, boolean isRecoverable) |
Creates an instance.
|
-
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
public final int errorCode
The error value returned from the sink implementation. If the sink writes to a platform AudioTrack, this will be the error value returned from AudioTrack.write(byte[], int, int) or AudioTrack.write(ByteBuffer, int, int). Otherwise, the meaning of the error code depends on the sink implementation.
-
public final boolean isRecoverable
If the exception can be recovered by recreating the sink.
-
public final[Format](../Format.html "class in com.google.android.exoplayer2")format
The input Format of the sink when the error occurs.
-
public WriteException(int errorCode,[Format](../Format.html "class in com.google.android.exoplayer2")format,
boolean isRecoverable)
Creates an instance.
Parameters:errorCode - The error value returned from the sink implementation.format - The input format of the sink when the error occurs.isRecoverable - Whether the exception can be recovered by recreating the sink.