Class MimeTypeRegistryProviderImpl

java.lang.Object
org.eclipse.angus.activation.MimeTypeRegistryProviderImpl
All Implemented Interfaces:
MimeTypeRegistryProvider

public class MimeTypeRegistryProviderImpl extends Object implements MimeTypeRegistryProvider
  • Constructor Details

    • MimeTypeRegistryProviderImpl

      public MimeTypeRegistryProviderImpl()
      Default constructor
  • Method Details

    • getByFileName

      public MimeTypeRegistry getByFileName(String name) throws IOException
      Description copied from interface: MimeTypeRegistryProvider
      Retrieve an instance of the MimeTypeRegistry based on the name of the file where the MimeTypeEntries are stored.
      Specified by:
      getByFileName in interface MimeTypeRegistryProvider
      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: MimeTypeRegistryProvider
      Retrieve an instance of the MimeTypeRegistry based on the InputStream that is used to read data from some named resource.
      Specified by:
      getByInputStream in interface MimeTypeRegistryProvider
      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: MimeTypeRegistryProvider
      Retrieve an instance of the in-memory implementation of the MimeTypeRegistry. Jakarta Activation can throw NoSuchElementException or ServiceConfigurationError if no implementations were found.
      Specified by:
      getInMemory in interface MimeTypeRegistryProvider
      Returns:
      In-memory implementation of the MimeTypeRegistry.