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 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.SkipsnumberOfBits
bits.
-
-
-
Method Detail
-
reset
public void reset()
Deprecated.Resets the reading position to zero.
-
readBit
public boolean readBit()
Deprecated.Reads a single bit.- Returns:
true
if the bit is set,false
otherwise.
-
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
numBits
bits hold the read data.
-
skipBits
public void skipBits(int numBits)
Deprecated.SkipsnumberOfBits
bits.- 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.
-
-