Package jakarta.activation
Interface MimeTypeRegistry
-
public interface MimeTypeRegistryThe MimeTypeRegistry interface is implemented by objects that can be used to store and retrieve MimeTypeEntries.Application must implement
MimeTypeRegistryProviderto create new instances of the MimeTypeRegistry. Implementation of the MimeTypeRegistry can store MimeTypeEntries in different ways and that storage must be accessible through theMimeTypeRegistryProvidermethods. Implementation of the MimeTypeRegistry must contain in-memory storage for MimeTypeEntries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidappendToRegistry(String mime_types)Appends string of entries to the types registryMimeTypeEntrygetMimeTypeEntry(String file_ext)get the MimeTypeEntry based on the file extensiondefault StringgetMIMETypeString(String file_ext)Get the MIME type string corresponding to the file extension.
-
-
-
Method Detail
-
getMimeTypeEntry
MimeTypeEntry getMimeTypeEntry(String file_ext)
get the MimeTypeEntry based on the file extension- Parameters:
file_ext- the file extension- Returns:
- the MimeTypeEntry
-
getMIMETypeString
default String getMIMETypeString(String file_ext)
Get the MIME type string corresponding to the file extension.- Parameters:
file_ext- the file extension- Returns:
- the MIME type string
-
appendToRegistry
void appendToRegistry(String mime_types)
Appends string of entries to the types registry- Parameters:
mime_types- the mime.types string
-
-