|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jeuclid.converter.ConverterRegistry
public final class ConverterRegistry
A registry for image converters.
Constructor Summary | |
---|---|
protected |
ConverterRegistry()
Default constructor. |
Method Summary | |
---|---|
Set<String> |
getAvailableExtensions()
Retrieve a list of all available extensions. |
Set<String> |
getAvailableOutfileTypes()
Retrieve a list of available mime types for conversion. |
ConverterPlugin |
getConverter(String mimeType)
Retrieve the converter for a given mime-type. |
static ConverterRegistry |
getInstance()
Retrieve the default registry instance. |
String |
getMimeTypeForSuffix(String suffix)
Returns the MimeType for a given suffix. |
static ConverterRegistry |
getRegisty()
Deprecated. use getInstance() instead. |
String |
getSuffixForMimeType(String mimeType)
Returns the file suffix suitable for the given mime type. |
void |
registerConverter(String mimeType,
ConverterPlugin converter,
boolean primary)
Registers a converter for the given mime type. |
void |
registerMimeTypeAndSuffix(String mimeType,
String suffix,
boolean primary)
Registers a new MimeType and it's suffix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ConverterRegistry()
Method Detail |
---|
public static ConverterRegistry getInstance()
@Deprecated public static ConverterRegistry getRegisty()
getInstance()
instead.
getInstance()
instead.
getInstance()
public Set<String> getAvailableOutfileTypes()
public Set<String> getAvailableExtensions()
public String getSuffixForMimeType(String mimeType)
This function is not fully implemented yet
mimeType
- a mimetype, as returned by getAvailableOutfileTypes()
, or null if unknown.
public String getMimeTypeForSuffix(String suffix)
suffix
- the suffix, e.g. png, or null if unknown.
public void registerMimeTypeAndSuffix(String mimeType, String suffix, boolean primary)
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.public void registerConverter(String mimeType, ConverterPlugin converter, boolean primary)
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.public ConverterPlugin getConverter(String mimeType)
mimeType
- the Mime-Type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |