Top Description Methods
jakarta.activation.spi

public Interface MailcapRegistryProvider

Imports
jakarta.activation.MailcapRegistry, java.io.IOException, .InputStream, java.util.NoSuchElementException, .ServiceConfigurationError

This interface defines a factory for 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.

Method Summary

Modifier and TypeMethod and Description
public MailcapRegistry

Returns:

The instance of the MailcapRegistry, or null if none are found.
getByFileName
(String
The name of the file that stores MailcapEntries.
name
)

Retrieve an instance of the MailcapRegistry based on the name of the file where the MailcapEntries are stored.

public MailcapRegistry

Returns:

The instance of the MailcapRegistry, or null if none are found.
getByInputStream
(InputStream
InputStream for some resource that contains MailcapEntries.
inputStream
)

Retrieve an instance of the MailcapRegistry based on the InputStream that is used to read data from some named resource.

public MailcapRegistry

Returns:

In-memory implementation of the MailcapRegistry.
getInMemory
()

Retrieve an instance of the in-memory implementation of the MailcapRegistry.

Method Detail

getByFileNameback to summary
public MailcapRegistry getByFileName(String name) throws IOException

Retrieve an instance of the MailcapRegistry based on the name of the file where the MailcapEntries are stored.

Parameters
name:String

The name of the file that stores MailcapEntries.

Returns:MailcapRegistry

The instance of the MailcapRegistry, or null if none are found.

Exceptions
IOException:
If an instance of the MailcapRegistry class cannot be found or loaded.
getByInputStreamback to summary
public MailcapRegistry getByInputStream(InputStream inputStream) throws IOException

Retrieve an instance of the MailcapRegistry based on the InputStream that is used to read data from some named resource.

Parameters
inputStream:InputStream

InputStream for some resource that contains MailcapEntries.

Returns:MailcapRegistry

The instance of the MailcapRegistry, or null if none are found.

Exceptions
IOException:
If an instance of the MailcapRegistry class cannot be found or loaded.
getInMemoryback to summary
public MailcapRegistry getInMemory()

Retrieve an instance of the in-memory implementation of the MailcapRegistry.

Returns:MailcapRegistry

In-memory implementation of the MailcapRegistry.

Exceptions
NoSuchElementException:
If no implementations were found.
ServiceConfigurationError:
If no implementations were loaded.