Back to Exoplayer

VorbisBitArray (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisBitArray.html

latest3.5 KB
Original Source

Package com.google.android.exoplayer2.extractor

Class VorbisBitArray


[@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

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.

Skips numberOfBits bits. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

VorbisBitArray

public VorbisBitArray​(byte[] data)

Deprecated.

Creates a new instance that wraps an existing array. Parameters:data - the array to wrap.

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.

Skips numberOfBits 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.