Class DefaultContentMetadata
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.cache.DefaultContentMetadata
-
- All Implemented Interfaces:
ContentMetadata
@Deprecated public final class DefaultContentMetadata extends Object implements ContentMetadata
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 ofContentMetadata
. 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 copyDefaultContentMetadata
withmutations
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.
-
-
-
Field Detail
-
EMPTY
public static final DefaultContentMetadata EMPTY
Deprecated.An empty DefaultContentMetadata.
-
-
Method Detail
-
copyWithMutationsApplied
public DefaultContentMetadata copyWithMutationsApplied(ContentMetadataMutations mutations)
Deprecated.Returns a copyDefaultContentMetadata
withmutations
applied. Ifmutations
don't change anything, returns this instance.
-
entrySet
public Set<Map.Entry<String,byte[]>> entrySet()
Deprecated.Returns the set of metadata entries in their raw byte array form.
-
get
@Nullable public final byte[] get(String key, @Nullable byte[] defaultValue)
Deprecated.Description copied from interface:ContentMetadata
Returns a metadata value.- Specified by:
get
in interfaceContentMetadata
- Parameters:
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 get(String key, @Nullable String defaultValue)
Deprecated.Description copied from interface:ContentMetadata
Returns a metadata value.- Specified by:
get
in interfaceContentMetadata
- Parameters:
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 key, long defaultValue)
Deprecated.Description copied from interface:ContentMetadata
Returns a metadata value.- Specified by:
get
in interfaceContentMetadata
- Parameters:
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 key)
Deprecated.Description copied from interface:ContentMetadata
Returns whether the metadata is available.- Specified by:
contains
in interfaceContentMetadata
-
-