Back to Exoplayer

Allocation (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/upstream/Allocation.html

latest2.4 KB
Original Source

Package com.google.android.exoplayer2.upstream

Class Allocation


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classAllocationextends[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.

An allocation within a byte array.

The allocation's length is obtained by calling Allocator.getIndividualAllocationLength() on the Allocator from which it was obtained.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | byte[] | data | Deprecated.

The array containing the allocated space. | | int | offset | Deprecated.

The offset of the allocated space in data. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Allocation​(byte[] data, int offset) | Deprecated. |

Method Summary

- 

Methods inherited from class java.lang.Object

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

Field Detail

- 

data

public final byte[] data

Deprecated.

The array containing the allocated space. The allocated space might not be at the start of the array, and so offset must be used when indexing into it.

- 

offset

public final int offset

Deprecated.

The offset of the allocated space in data.

Constructor Detail

- 

Allocation

public Allocation​(byte[] data,
                  int offset)

Deprecated. Parameters:data - The array containing the allocated space.offset - The offset of the allocated space in data.