docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisBitArray.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 classVorbisBitArrayextends[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.
Wraps a byte array, providing methods that allow it to be read as a Vorbis bitstream.
See the Vorbis bitpacking specification
Constructors | Constructor | Description |
| --- | --- |
| VorbisBitArray(byte[] data) |
Deprecated.
Creates a new instance that wraps an existing array. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| int | bitsLeft() |
Deprecated.
Returns the number of remaining bits.
|
| int | getPosition() |
Deprecated.
Returns the reading position in bits.
|
| boolean | readBit() |
Deprecated.
Reads a single bit.
|
| int | readBits(int numBits) |
Deprecated.
Reads up to 32 bits.
|
| void | reset() |
Deprecated.
Resets the reading position to zero.
|
| void | setPosition(int position) |
Deprecated.
Sets the reading position in bits.
|
| void | skipBits(int numBits) |
Deprecated.
Skips numberOfBits bits.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public VorbisBitArray(byte[] data)
Deprecated.
Creates a new instance that wraps an existing array.
Parameters:data - the array to wrap.
-
public void reset()
Deprecated.
Resets the reading position to zero.
-
public boolean readBit()
Deprecated.
Reads a single bit.
Returns:true if the bit is set, false otherwise.
-
public int readBits(int numBits)
Deprecated.
Reads up to 32 bits.
Parameters:numBits - The number of bits to read.Returns:An integer whose bottom numBits bits hold the read data.
-
public void skipBits(int numBits)
Deprecated.
Skips numberOfBits bits.
Parameters:numBits - The number of bits to skip.
-
public int getPosition()
Deprecated.
Returns the reading position in bits.
-
public void setPosition(int position)
Deprecated.
Sets the reading position in bits.
Parameters:position - The new reading position in bits.
-
public int bitsLeft()
Deprecated.
Returns the number of remaining bits.