metadataToExtract

inline fun <T : Any> MetadataExtractorRegistry.metadataToExtract(mimeType: MimeType, name: String? = null)

Extension for MetadataExtractorRegistry.metadataToExtract providing a metadataToExtract<Foo>(...) variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

Author

Sebastien Deleuze

Since

5.2

Parameters

mimeType

the mime type of metadata entries to extract

name

assign a name for the decoded value; if not provided, then the mime type is used as the key

T

the target value type to decode to


inline fun <T : Any> MetadataExtractorRegistry.metadataToExtract(mimeType: MimeType, noinline mapper: (T, MutableMap<String, Any>) -> Unit)

Extension for MetadataExtractorRegistry.metadataToExtract providing a metadataToExtract<Foo>(...) variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

Author

Sebastien Deleuze

Since

5.2

Parameters

mimeType

the mime type of metadata entries to extract

mapper

custom logic to add the decoded value to the output map

T

the target value type to decode to