Class VorbisBitArray
- java.lang.Object
-
- com.google.android.exoplayer2.extractor.VorbisBitArray
-
@Deprecated public final class VorbisBitArray extends Object
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
-
-
Constructor Summary
Constructors Constructor Description VorbisBitArray(byte[] data)Deprecated.Creates a new instance that wraps an existing array.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intbitsLeft()Deprecated.Returns the number of remaining bits.intgetPosition()Deprecated.Returns the reading position in bits.booleanreadBit()Deprecated.Reads a single bit.intreadBits(int numBits)Deprecated.Reads up to 32 bits.voidreset()Deprecated.Resets the reading position to zero.voidsetPosition(int position)Deprecated.Sets the reading position in bits.voidskipBits(int numBits)Deprecated.SkipsnumberOfBitsbits.
-
-
-
Method Detail
-
reset
public void reset()
Deprecated.Resets the reading position to zero.
-
readBit
public boolean readBit()
Deprecated.Reads a single bit.- Returns:
trueif the bit is set,falseotherwise.
-
readBits
public int readBits(int numBits)
Deprecated.Reads up to 32 bits.- Parameters:
numBits- The number of bits to read.- Returns:
- An integer whose bottom
numBitsbits hold the read data.
-
skipBits
public void skipBits(int numBits)
Deprecated.SkipsnumberOfBitsbits.- Parameters:
numBits- The number of bits to skip.
-
getPosition
public int getPosition()
Deprecated.Returns the reading position in bits.
-
setPosition
public void setPosition(int position)
Deprecated.Sets the reading position in bits.- Parameters:
position- The new reading position in bits.
-
bitsLeft
public int bitsLeft()
Deprecated.Returns the number of remaining bits.
-
-