Compartilhar via


MimeTypeMap.GetExtensionFromMimeType(String) Method

Definition

Return the registered extension for the given MIME type.

[Android.Runtime.Register("getExtensionFromMimeType", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetExtensionFromMimeType_Ljava_lang_String_Handler")]
public virtual string? GetExtensionFromMimeType (string? mimeType);
[<Android.Runtime.Register("getExtensionFromMimeType", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetExtensionFromMimeType_Ljava_lang_String_Handler")>]
abstract member GetExtensionFromMimeType : string -> string
override this.GetExtensionFromMimeType : string -> string

Parameters

mimeType
String

A MIME type (i.e. text/plain)

Returns

The extension for the given MIME type or null if there is none.

Attributes

Remarks

Return the registered extension for the given MIME type. Note that some MIME types map to multiple extensions. This call will return the most common extension for the given MIME type.

Java documentation for android.webkit.MimeTypeMap.getExtensionFromMimeType(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to