Back to Exoplayer

DefaultContentMetadata (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/upstream/cache/DefaultContentMetadata.html

latest7.3 KB
Original Source

Package com.google.android.exoplayer2.upstream.cache

Class DefaultContentMetadata

  • java.lang.Object

    • com.google.android.exoplayer2.upstream.cache.DefaultContentMetadata
  • All Implemented Interfaces:ContentMetadata


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDefaultContentMetadataextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ContentMetadata](ContentMetadata.html "interface in com.google.android.exoplayer2.upstream.cache")

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.

Default implementation of ContentMetadata. Values are stored as byte arrays.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static DefaultContentMetadata | EMPTY | Deprecated.

An empty DefaultContentMetadata. |

- 

Fields inherited from interface com.google.android.exoplayer2.upstream.cache.ContentMetadata

KEY_CONTENT_LENGTH, KEY_CUSTOM_PREFIX, KEY_REDIRECTED_URI

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | DefaultContentMetadata() | Deprecated. | | DefaultContentMetadata​(Map<String,​byte[]> metadata) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | contains​(String key) | Deprecated.

Returns whether the metadata is available. | | DefaultContentMetadata | copyWithMutationsApplied​(ContentMetadataMutations mutations) | Deprecated.

Returns a copy DefaultContentMetadata with mutations applied. | | Set<Map.Entry<String,​byte[]>> | entrySet() | Deprecated.

Returns the set of metadata entries in their raw byte array form. | | boolean | equals​(Object o) | Deprecated. | | byte[] | get​(String key, byte[] defaultValue) | Deprecated.

Returns a metadata value. | | long | get​(String key, long defaultValue) | Deprecated.

Returns a metadata value. | | String | get​(String key, String defaultValue) | Deprecated.

Returns a metadata value. | | int | hashCode() | Deprecated. |

- 

Methods inherited from class java.lang.Object

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

Field Detail

- 

EMPTY

public static final[DefaultContentMetadata](DefaultContentMetadata.html "class in com.google.android.exoplayer2.upstream.cache")EMPTY

Deprecated.

An empty DefaultContentMetadata.

Constructor Detail

- 

DefaultContentMetadata

public DefaultContentMetadata()

Deprecated.

- 

DefaultContentMetadata

public DefaultContentMetadata​([Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),​byte[]> metadata)

Deprecated. Parameters:metadata - The metadata entries in their raw byte array form.

Method Detail

- 

copyWithMutationsApplied

public[DefaultContentMetadata](DefaultContentMetadata.html "class in com.google.android.exoplayer2.upstream.cache")copyWithMutationsApplied​([ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")mutations)

Deprecated.

Returns a copy DefaultContentMetadata with mutations applied. If mutations don't change anything, returns this instance.

- 

entrySet

public[Set](https://developer.android.com/reference/java/util/Set.html "class or interface in java.util")<[Map.Entry](https://developer.android.com/reference/java/util/Map.Entry.html?is-external=true "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),​byte[]>> entrySet()

Deprecated.

Returns the set of metadata entries in their raw byte array form.

- 

get

@Nullable
public final byte[] get​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")key,
                        @Nullable
                        byte[] defaultValue)

Deprecated.

Description copied from interface: ContentMetadata

Returns a metadata value. Specified by:get in interface ContentMetadataParameters:key - Key of the metadata to be returned.defaultValue - Value to return if the metadata doesn't exist.Returns:The metadata value.

- 

get

@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")get​([String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")key,
                        @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")defaultValue)

Deprecated.

Description copied from interface: ContentMetadata

Returns a metadata value. Specified by:get in interface ContentMetadataParameters:key - Key of the metadata to be returned.defaultValue - Value to return if the metadata doesn't exist.Returns:The metadata value.

- 

get

public final long get​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")key,
                      long defaultValue)

Deprecated.

Description copied from interface: ContentMetadata

Returns a metadata value. Specified by:get in interface ContentMetadataParameters:key - Key of the metadata to be returned.defaultValue - Value to return if the metadata doesn't exist.Returns:The metadata value.

- 

contains

public final boolean contains​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")key)

Deprecated.

Description copied from interface: ContentMetadata

Returns whether the metadata is available. Specified by:contains in interface ContentMetadata

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")o)

Deprecated. Overrides:equals in class Object

- 

hashCode

public int hashCode()

Deprecated. Overrides:hashCode in class Object