barcode4j 2.1.0

org.krysalis.barcode4j.output.bitmap
Class BitmapEncoderRegistry

java.lang.Object
  extended by org.krysalis.barcode4j.output.bitmap.BitmapEncoderRegistry

public class BitmapEncoderRegistry
extends java.lang.Object

Registry class for BitmapEncoders.

Version:
$Id: BitmapEncoderRegistry.java,v 1.3 2010/10/05 06:57:44 jmaerki Exp $
Author:
Jeremias Maerki

Constructor Summary
protected BitmapEncoderRegistry()
          Utility class: Constructor prevents instantiating when subclassed.
 
Method Summary
static BitmapEncoder getInstance(java.lang.String mime)
          Returns a BitmapEncoder instance for a particular MIME type.
static java.util.Set getSupportedMIMETypes()
          Returns a Set of Strings with all the supported MIME types from all registered BitmapEncoders.
static void register(java.lang.String classname, int priority)
          Register a new BitmapEncoder implementation.
static boolean supports(BitmapEncoder encoder, java.lang.String mime)
          Indicates whether a specific BitmapEncoder implementation supports a particular MIME type.
static boolean supports(java.lang.String mime)
          Indicates whether a particular MIME type is supported by one of the registered BitmapEncoder implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitmapEncoderRegistry

protected BitmapEncoderRegistry()
Utility class: Constructor prevents instantiating when subclassed.

Method Detail

register

public static void register(java.lang.String classname,
                            int priority)
Register a new BitmapEncoder implementation.

Parameters:
classname - fully qualified classname of the BitmapEncoder implementation
priority - 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

public static boolean supports(BitmapEncoder encoder,
                               java.lang.String mime)
Indicates whether a specific BitmapEncoder implementation supports a particular MIME type.

Parameters:
encoder - BitmapEncoder to inspect
mime - MIME type to check
Returns:
true if the MIME type is supported

supports

public static boolean supports(java.lang.String mime)
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

public static BitmapEncoder getInstance(java.lang.String mime)
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

public static java.util.Set getSupportedMIMETypes()
Returns a Set of Strings with all the supported MIME types from all registered BitmapEncoders.

Returns:
a Set of Strings (MIME types)

barcode4j 2.1.0

Copyright © 2000-2010 Jeremias Maerki. All rights reserved.