Class ConverterRegistry
java.lang.Object
net.sourceforge.jeuclid.converter.ConverterRegistry
A registry for image converters.
- Version:
- $Revision: 5a7becda9147 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieve a list of all available extensions.Retrieve a list of available mime types for conversion.getConverter(String mimeType) Retrieve the converter for a given mime-type.static ConverterRegistryRetrieve the default registry instance.getMimeTypeForSuffix(String suffix) Returns the MimeType for a given suffix.static ConverterRegistryDeprecated.getSuffixForMimeType(String mimeType) Returns the file suffix suitable for the given mime type.voidregisterConverter(String mimeType, ConverterPlugin converter, boolean primary) Registers a converter for the given mime type.voidregisterMimeTypeAndSuffix(String mimeType, String suffix, boolean primary) Registers a new MimeType and it's suffix.
-
Constructor Details
-
ConverterRegistry
protected ConverterRegistry()Default constructor.
-
-
Method Details
-
getInstance
Retrieve the default registry instance.- Returns:
- the ConverterRegistry.
-
getRegisty
Deprecated.usegetInstance()instead.usegetInstance()instead.- Returns:
- see
getInstance()
-
getAvailableOutfileTypes
Retrieve a list of available mime types for conversion.- Returns:
- a Set<String> containing all valid mime-types.
-
getAvailableExtensions
Retrieve a list of all available extensions.- Returns:
- a list of available extensions.
-
getSuffixForMimeType
Returns the file suffix suitable for the given mime type.This function is not fully implemented yet
- Parameters:
mimeType- a mimetype, as returned bygetAvailableOutfileTypes(), or null if unknown.- Returns:
- the three letter suffix common for this type.
-
getMimeTypeForSuffix
Returns the MimeType for a given suffix.- Parameters:
suffix- the suffix, e.g. png, or null if unknown.- Returns:
- the mime-type
-
registerMimeTypeAndSuffix
Registers a new MimeType and it's suffix.- Parameters:
mimeType- the Mime-Typesuffix- The Suffixprimary- If true, old mappings will be overwritten. If false and a mapping already exists, it will stay the same.
-
registerConverter
Registers a converter for the given mime type.- Parameters:
mimeType- The mime type.converter- The converter to register.primary- Converter for this type. If true, old mappings will be overwritten. If false and a mapping already exists, it will stay the same.
-
getConverter
Retrieve the converter for a given mime-type.- Parameters:
mimeType- the Mime-Type.- Returns:
- a Converter instance
-
getInstance()instead.