docs/doc/reference/com/google/android/exoplayer2/extractor/ExtractorUtil.html
Package com.google.android.exoplayer2.extractor
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classExtractorUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Extractor related utility methods.
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static void | checkContainerInput(boolean expression, String message) |
Deprecated.
If expression is false, throws a container malformed ParserException with the given message.
|
| static boolean | peekFullyQuietly(ExtractorInput input, byte[] output, int offset, int length, boolean allowEndOfInput) |
Deprecated.
Peeks data from input, respecting allowEndOfInput.
|
| static int | peekToLength(ExtractorInput input, byte[] target, int offset, int length) |
Deprecated.
Peeks length bytes from the input peek position, or all the bytes to the end of the input if there was less than length bytes left.
|
| static boolean | readFullyQuietly(ExtractorInput input, byte[] output, int offset, int length) |
Deprecated.
Equivalent to ExtractorInput.readFully(byte[], int, int) except that it returns false instead of throwing an EOFException if the end of input is encountered without having fully satisfied the read.
|
| static boolean | skipFullyQuietly(ExtractorInput input, int length) |
Deprecated.
Equivalent to ExtractorInput.skipFully(int) except that it returns false instead of throwing an EOFException if the end of input is encountered without having fully satisfied the skip.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
@Pure
public static void checkContainerInput(boolean expression,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message)
throws[ParserException](../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
If expression is false, throws a container malformed ParserException with the given message. Otherwise, does nothing.
Throws:ParserException
-
public static int peekToLength([ExtractorInput](ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,
byte[] target,
int offset,
int length)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Peeks length bytes from the input peek position, or all the bytes to the end of the input if there was less than length bytes left.
If an exception is thrown, there is no guarantee on the peek position.
Parameters:input - The stream input to peek the data from.target - A target array into which data should be written.offset - The offset into the target array at which to write.length - The maximum number of bytes to peek from the input.Returns:The number of bytes peeked.Throws:IOException - If an error occurs peeking from the input.
-
public static boolean readFullyQuietly([ExtractorInput](ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,
byte[] output,
int offset,
int length)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Equivalent to ExtractorInput.readFully(byte[], int, int) except that it returns false instead of throwing an EOFException if the end of input is encountered without having fully satisfied the read.
Throws:IOException
-
public static boolean skipFullyQuietly([ExtractorInput](ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,
int length)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Equivalent to ExtractorInput.skipFully(int) except that it returns false instead of throwing an EOFException if the end of input is encountered without having fully satisfied the skip.
Throws:IOException
-
public static boolean peekFullyQuietly([ExtractorInput](ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,
byte[] output,
int offset,
int length,
boolean allowEndOfInput)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Peeks data from input, respecting allowEndOfInput. Returns true if the peek is successful.
If allowEndOfInput=false then encountering the end of the input (whether before or after reading some data) will throw EOFException.
If allowEndOfInput=true then encountering the end of the input (even after reading some data) will return false.
This is slightly different to the behaviour of ExtractorInput.peekFully(byte[], int, int, boolean), where allowEndOfInput=true only returns false (and suppresses the exception) if the end of the input is reached before reading any data.
Throws:IOException