Package org.eclipse.angus.activation
Class MimeTypeRegistryProviderImpl
java.lang.Object
org.eclipse.angus.activation.MimeTypeRegistryProviderImpl
- All Implemented Interfaces:
MimeTypeRegistryProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetByFileName(String name) Retrieve an instance of the MimeTypeRegistry based on the name of the file where the MimeTypeEntries are stored.getByInputStream(InputStream inputStream) Retrieve an instance of the MimeTypeRegistry based on the InputStream that is used to read data from some named resource.Retrieve an instance of the in-memory implementation of the MimeTypeRegistry.
-
Constructor Details
-
MimeTypeRegistryProviderImpl
public MimeTypeRegistryProviderImpl()Default constructor
-
-
Method Details
-
getByFileName
Description copied from interface:MimeTypeRegistryProviderRetrieve an instance of the MimeTypeRegistry based on the name of the file where the MimeTypeEntries are stored.- Specified by:
getByFileNamein interfaceMimeTypeRegistryProvider- Parameters:
name- The name of the file that stores MimeTypeEntries.- Returns:
- The instance of the
MimeTypeRegistry, or null if none are found. - Throws:
IOException- If an instance of the MailcapRegistry class cannot be found or loaded.
-
getByInputStream
Description copied from interface:MimeTypeRegistryProviderRetrieve an instance of the MimeTypeRegistry based on the InputStream that is used to read data from some named resource.- Specified by:
getByInputStreamin interfaceMimeTypeRegistryProvider- Parameters:
inputStream- InputStream for some resource that contains MimeTypeEntries.- Returns:
- The instance of the
MimeTypeRegistry, or null if none are found. - Throws:
IOException- If an instance of the MailcapRegistry class cannot be found or loaded.
-
getInMemory
Description copied from interface:MimeTypeRegistryProviderRetrieve an instance of the in-memory implementation of the MimeTypeRegistry. Jakarta Activation can throwNoSuchElementExceptionorServiceConfigurationErrorif no implementations were found.- Specified by:
getInMemoryin interfaceMimeTypeRegistryProvider- Returns:
- In-memory implementation of the MimeTypeRegistry.
-