public class ImageEncoders
extends java.lang.Object
Constructor and Description |
---|
ImageEncoders() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class |
getEncoderClass(java.lang.String format)
Returns the class of the image encoder for the specified format,
or null if not specified yet.
|
static ImageEncoder |
newInstance(java.lang.String format)
Instantiates and returns the image encoder for the specified format.
|
static java.lang.Class |
setEncoderClass(java.lang.String format,
java.lang.Class klass)
Sets the class of the image encoder for the specified format.
|
public static ImageEncoder newInstance(java.lang.String format)
format
- The image format of the ZK image being encoded to.
It can be "png" or "jpeg".java.lang.IllegalArgumentException
- if the encoder of the specified
format is not foundSystemException
- if failed to instantiate the encoderpublic static java.lang.Class setEncoderClass(java.lang.String format, java.lang.Class klass)
An instance of the specified class is instantiated each
time newInstance(java.lang.String)
is called.
format
- The image format of the ZK image being encoded to.
It can be "png" or "jpeg".klass
- the class of the image encoder.
It must implement ImageEncoder
.public static java.lang.Class getEncoderClass(java.lang.String format)
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.