Package org.eclipse.angus.activation
Class MimeTypeRegistryProviderImpl
- java.lang.Object
-
- org.eclipse.angus.activation.MimeTypeRegistryProviderImpl
-
- All Implemented Interfaces:
MimeTypeRegistryProvider
public class MimeTypeRegistryProviderImpl extends Object implements MimeTypeRegistryProvider
-
-
Constructor Summary
Constructors Constructor Description MimeTypeRegistryProviderImpl()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MimeTypeRegistrygetByFileName(String name)Retrieve an instance of the MimeTypeRegistry based on the name of the file where the MimeTypeEntries are stored.MimeTypeRegistrygetByInputStream(InputStream inputStream)Retrieve an instance of the MimeTypeRegistry based on the InputStream that is used to read data from some named resource.MimeTypeRegistrygetInMemory()Retrieve an instance of the in-memory implementation of the MimeTypeRegistry.
-
-
-
Method Detail
-
getByFileName
public MimeTypeRegistry getByFileName(String name) throws IOException
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
public MimeTypeRegistry getByInputStream(InputStream inputStream) throws IOException
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
public MimeTypeRegistry 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.
-
-