Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DrmUtils.ExtendedMetadataParser\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nExtendedMetadataParser\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/drm/DrmUtils.ExtendedMetadataParser \"View this page in Java\") \n\n```\nopen class ExtendedMetadataParser\n```\n\n|---|--------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.drm.DrmUtils.ExtendedMetadataParser](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 30.**\n|\n| Deprecated in Java.\n\nUtility that parses extended metadata embedded in DRM constraint information.\n\nUsage example:\n\nbyte\\[\\] extendedMetadata \n= constraints.getAsByteArray(DrmStore.ConstraintsColumns.EXTENDED_METADATA); \nExtendedMetadataParser parser = getExtendedMetadataParser(extendedMetadata); \nIterator keyIterator = parser.keyIterator(); \nwhile (keyIterator.hasNext()) { \nString extendedMetadataKey = keyIterator.next(); \nString extendedMetadataValue = parser.get(extendedMetadataKey); \n}\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [get](#get(kotlin.String))`(`key:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` This method retrieves the metadata value associated with a given key. |\n| open [MutableIterator](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-iterator/index.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\\\u003e! | [iterator](#iterator())`()` This method returns an iterator object that can be used to iterate over all values of the metadata. |\n| open [MutableIterator](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-iterator/index.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\\\u003e! | [keyIterator](#keyIterator())`()` This method returns an iterator object that can be used to iterate over all keys of the metadata. |\n\nPublic methods\n--------------\n\n### get\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun get(key: String!): String!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nThis method retrieves the metadata value associated with a given key.\n\n| Parameters ||\n|-------|----------------------------------------------------------------------------------------------------------------------------|\n| `key` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: The key whose value is being retrieved. |\n\n| Return ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The metadata value associated with the given key. Returns null if the key is not found. |\n\n### iterator\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun iterator(): MutableIterator\u003cString!\u003e!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nThis method returns an iterator object that can be used to iterate over all values of the metadata.\n\n| Return ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|\n| [MutableIterator](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-iterator/index.html)\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\u003e! | The iterator object. |\n\n### keyIterator\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun keyIterator(): MutableIterator\u003cString!\u003e!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nThis method returns an iterator object that can be used to iterate over all keys of the metadata.\n\n| Return ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|\n| [MutableIterator](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-iterator/index.html)\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\u003e! | The iterator object. |"]]