com.digertech.sdk.imgvalidate
Class ImageValidator

java.lang.Object
  extended by com.digertech.sdk.imgvalidate.ImageValidator

public class ImageValidator
extends java.lang.Object

Class ImageValidator check or validate the image data whether it is confirmed to the X9.100-181 standard.

There are two methods to validate the image data:

public boolean isImageValid(byte[] imageData) throws ImageException - this method only checks wether the image is confirmed to X9.100-181 standard. If any invalid value found, it will stop proces and return false. So the performance of this method is better.

public int[] validateImage(byte[] imageData) throws ImageException - this method checks whether all options in the X9.100-181 standard are confirmed to the standard. It only stops the process when all options are done or there an error while validating the image.

Class ImageValidator is part of DigerTech Inc. image validation SDK. License key is required to performance the process. For each JVM, the method setLicenseKey should be called one and only one time which will validate the license key.

If the license key is valid, ImageValidator returns the valid product id of the license. Othwise a free version product id is returned. The following are all valid product id:

SDK_FREE
SDK_IMAGE_VALIDATE_DEVELOPER
SDK_IMAGE_VALIDATE_ENTERPRISE_I
SDK_IMAGE_VALIDATE_ENTERPRISE_II


Field Summary
static int SDK_FREE
           
static int SDK_IMAGE_VALIDATE_DEVELOPER
           
static int SDK_IMAGE_VALIDATE_ENTERPRISE_I
           
static int SDK_IMAGE_VALIDATE_ENTERPRISE_II
           
 
Constructor Summary
ImageValidator()
          Constructs a newly allocated ImageValidator that represents the image validator.
 
Method Summary
static IVLicenseInfo getLicenseInfo()
          If a license key is set to the SDK and the license key is valid, the license info will be return after it is validated.
 ImageTagValue getTagValue(int tagNum)
           
 boolean isEOFB()
          Check whether image strip is terminated by a 24-bit End-of-Facsimile-Block (EOFB) code.
 boolean isImageValid(byte[] imageData)
          Check wether the image is confirmed to X9.100-181 standard.
 boolean isLittleEndian()
          Check whether the byte order in the image is little endian.
 boolean isSinglePage()
          Check whether the image is single page.
 boolean isTagInOrder()
          Check whether all tags in image are in order.
static int setLicenseKey(java.lang.String licenseKey)
           
 int[] validateImage(byte[] imageData)
          Checks whether all required options in the X9.100-181 standard are confirmed to the standard.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SDK_FREE

public static final int SDK_FREE
See Also:
Constant Field Values

SDK_IMAGE_VALIDATE_DEVELOPER

public static final int SDK_IMAGE_VALIDATE_DEVELOPER
See Also:
Constant Field Values

SDK_IMAGE_VALIDATE_ENTERPRISE_I

public static final int SDK_IMAGE_VALIDATE_ENTERPRISE_I
See Also:
Constant Field Values

SDK_IMAGE_VALIDATE_ENTERPRISE_II

public static final int SDK_IMAGE_VALIDATE_ENTERPRISE_II
See Also:
Constant Field Values
Constructor Detail

ImageValidator

public ImageValidator()
Constructs a newly allocated ImageValidator that represents the image validator.

Method Detail

isImageValid

public boolean isImageValid(byte[] imageData)
                     throws ImageException
Check wether the image is confirmed to X9.100-181 standard. If any invalid value found, it will stop proces and return false.

Parameters:
imageData - the image data
Returns:
boolean the image data is valid if return true.
Throws:
ImageException

isEOFB

public boolean isEOFB()
Check whether image strip is terminated by a 24-bit End-of-Facsimile-Block (EOFB) code. This method should be called only after validateImage(byte[]) method is called.

Returns:
boolean - image strip is terminated by a 24-bit End-of-Facsimile-Block (EOFB) code

validateImage

public int[] validateImage(byte[] imageData)
                    throws ImageException
Checks whether all required options in the X9.100-181 standard are confirmed to the standard. It only stops the process when all options are done or there an error while validating the image.

Parameters:
imageData - image data.
Returns:
all tag numbers in the image data.
Throws:
ImageException - if there an error while validating the image data.

isLittleEndian

public boolean isLittleEndian()
Check whether the byte order in the image is little endian. This method should be called only after validateImage(byte[]) method is called.

Returns:
boolean - image byte order is little endian.

isTagInOrder

public boolean isTagInOrder()
Check whether all tags in image are in order. This method should be called only after validateImage(byte[]) method is called.

Returns:
boolean - all tags in image are in order if return true.

isSinglePage

public boolean isSinglePage()
Check whether the image is single page. This method should be called only after validateImage(byte[]) method is called.

Returns:
boolean - image is single page if return true.

getTagValue

public ImageTagValue getTagValue(int tagNum)

setLicenseKey

public static int setLicenseKey(java.lang.String licenseKey)

getLicenseInfo

public static IVLicenseInfo getLicenseInfo()
If a license key is set to the SDK and the license key is valid, the license info will be return after it is validated. The license info contains product id of if the license is valid. Othwise a free version productId is returned. The following are all valid product id:

SDK_FREE
SDK_IMAGE_VALIDATE_DEVELOPER
SDK_IMAGE_VALIDATE_ENTERPRISE_I
SDK_IMAGE_VALIDATE_ENTERPRISE_II