public interface MailcapRegistryProvider
MailcapRegistry
. An
implementation of this interface should provide instances of the MailcapRegistry
based on the way how to access the storage for MailcapEntries.
Jakarta Activation uses Service Provider Interface and ServiceLoader
to obtain an instance of the implementation of the MailcapRegistryProvider
.
Modifier and Type | Method and Description |
---|---|
MailcapRegistry |
getByFileName(java.lang.String name)
Retrieve an instance of the MailcapRegistry based on the name of the file where the MailcapEntries are stored.
|
MailcapRegistry |
getByInputStream(java.io.InputStream inputStream)
Retrieve an instance of the MailcapRegistry based on the InputStream
that is used to read data from some named resource.
|
MailcapRegistry |
getInMemory()
Retrieve an instance of the in-memory implementation of the MailcapRegistry.
|
MailcapRegistry getByFileName(java.lang.String name) throws java.io.IOException
name
- The name of the file that stores MailcapEntries.MailcapRegistry
, or null if none are found.java.io.IOException
- If an instance of the MailcapRegistry class cannot be found or loaded.MailcapRegistry getByInputStream(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- InputStream for some resource that contains MailcapEntries.MailcapRegistry
, or null if none are found.java.io.IOException
- If an instance of the MailcapRegistry class cannot be found or loaded.MailcapRegistry getInMemory()
java.util.NoSuchElementException
- If no implementations were found.java.util.ServiceConfigurationError
- If no implementations were loaded.