Class BitmapEncoderRegistry
java.lang.Object
org.krysalis.barcode4j.output.bitmap.BitmapEncoderRegistry
Registry class for BitmapEncoders.
- Version:
- $Id: BitmapEncoderRegistry.java,v 1.3 2010-10-05 06:57:44 jmaerki Exp $
- Author:
- Jeremias Maerki
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUtility class: Constructor prevents instantiating when subclassed. -
Method Summary
Modifier and TypeMethodDescriptionstatic BitmapEncodergetInstance(String mime) Returns a BitmapEncoder instance for a particular MIME type.static SetReturns a Set of Strings with all the supported MIME types from all registered BitmapEncoders.static voidRegister a new BitmapEncoder implementation.static booleanIndicates whether a particular MIME type is supported by one of the registered BitmapEncoder implementations.static booleansupports(BitmapEncoder encoder, String mime) Indicates whether a specific BitmapEncoder implementation supports a particular MIME type.
-
Constructor Details
-
BitmapEncoderRegistry
protected BitmapEncoderRegistry()Utility class: Constructor prevents instantiating when subclassed.
-
-
Method Details
-
register
Register a new BitmapEncoder implementation.- Parameters:
classname- fully qualified classname of the BitmapEncoder implementationpriority- lets you define a priority for an encoder. If you want to give an encoder a high priority, assign a value of 100 or higher.
-
supports
Indicates whether a specific BitmapEncoder implementation supports a particular MIME type.- Parameters:
encoder- BitmapEncoder to inspectmime- MIME type to check- Returns:
- true if the MIME type is supported
-
supports
Indicates whether a particular MIME type is supported by one of the registered BitmapEncoder implementations.- Parameters:
mime- MIME type to check- Returns:
- true if the MIME type is supported
-
getInstance
Returns a BitmapEncoder instance for a particular MIME type.- Parameters:
mime- desired MIME type- Returns:
- a BitmapEncoder instance (throws an UnsupportedOperationException if no suitable BitmapEncoder is available)
-
getSupportedMIMETypes
Returns a Set of Strings with all the supported MIME types from all registered BitmapEncoders.- Returns:
- a Set of Strings (MIME types)
-