Package org.robolectric.shadows
Class ShadowMimeTypeMap
java.lang.Object
org.robolectric.shadows.ShadowMimeTypeMap
@Deprecated
@Implements(android.webkit.MimeTypeMap.class)
public class ShadowMimeTypeMap
extends Object
Deprecated.
run on Android APIs >= S, which allows the real Android mime type data to be used
Shadow for webkit's MimeTypeMap.
Only needed for APIs invalid input: '<' 31. Above that the real mime type mappings are used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtensionMimeTypeMapping(String extension, String mimeType) Deprecated.Adds a mapping between an extension and a mime type.voidDeprecated.Will clear all built-in mime type mappings, so future calls to APIS like getExtensionFromMimeType will only return data provided manually via addExtensionMimeTypeMapping.protected StringgetExtensionFromMimeType(String mimeType) Deprecated.protected StringgetMimeTypeFromExtension(String extension) Deprecated.protected static MimeTypeMapDeprecated.protected booleanhasExtension(String extension) Deprecated.protected booleanhasMimeType(String mimeType) Deprecated.
-
Constructor Details
-
ShadowMimeTypeMap
public ShadowMimeTypeMap()Deprecated.
-
-
Method Details
-
getSingleton
Deprecated. -
getMimeTypeFromExtension
Deprecated. -
getExtensionFromMimeType
Deprecated. -
addExtensionMimeTypeMapping
Deprecated.Adds a mapping between an extension and a mime type.Will be ignored when running on SDKs >= S, where a full mime type mapping is already present.
-
clearMappings
public void clearMappings()Deprecated.Will clear all built-in mime type mappings, so future calls to APIS like getExtensionFromMimeType will only return data provided manually via addExtensionMimeTypeMapping.Use of this API is not recommended! It is only present to support legacy, improperly written tests that fail with valid mime type mappings.
-
hasExtension
Deprecated. -
hasMimeType
Deprecated.
-