Module com.machinezoo.fingerprintio
Class Ansi378v2004Template
- java.lang.Object
-
- com.machinezoo.fingerprintio.ansi378v2004.Ansi378v2004Template
-
public class Ansi378v2004Template extends Object
ANSI INCITS 378-2004 template.- See Also:
- ANSI INCITS 378-2004 Summary
-
-
Field Summary
Fields Modifier and Type Field Description List<Ansi378v2004Fingerprint>fingerprintsList of fingerprints (FINGERPRINT).intheightImage height (HEIGHT).intresolutionXHorizontal pixel density (RESOLUTIONX).intresolutionYVertical pixel density (RESOLUTIONY).booleansensorCertifiedIndicates that the fingerprint reader has certificate of compliance with Appendix F of CJIS-RS-0010 V7.intsensorIdSensor ID (DEVID).intsubformatVendor-specified subformat (SUBFORMAT).intvendorIdVendor ID (VENDOR).intwidthImage width (WIDTH).
-
Constructor Summary
Constructors Constructor Description Ansi378v2004Template()Creates new ANSI INCITS 378-2004 template.Ansi378v2004Template(byte[] template)Parses and validates ANSI INCITS 378-2004 template.Ansi378v2004Template(byte[] template, boolean strict)Deprecated.UseAnsi378v2004Template(byte[], ExceptionHandler)instead.Ansi378v2004Template(byte[] template, ExceptionHandler handler)Parses and optionally validates ANSI INCITS 378-2004 template.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccepts(byte[] template)Checks whether provided template is an ANSI INCITS 378-2004 template.byte[]toByteArray()Validates and serializes the template in ANSI INCITS 378-2004 format.
-
-
-
Field Detail
-
vendorId
public int vendorId
Vendor ID (VENDOR). Defaults toIbiaOrganizations.UNKNOWN.
-
subformat
public int subformat
Vendor-specified subformat (SUBFORMAT).
-
sensorCertified
public boolean sensorCertified
Indicates that the fingerprint reader has certificate of compliance with Appendix F of CJIS-RS-0010 V7. This is the top bit of DEVSTAMP field.
-
sensorId
public int sensorId
Sensor ID (DEVID).
-
width
public int width
Image width (WIDTH).
-
height
public int height
Image height (HEIGHT).
-
resolutionX
public int resolutionX
Horizontal pixel density (RESOLUTIONX). Defaults to 197 (500dpi).
-
resolutionY
public int resolutionY
Vertical pixel density (RESOLUTIONY). Defaults to 197 (500dpi).
-
fingerprints
public List<Ansi378v2004Fingerprint> fingerprints
List of fingerprints (FINGERPRINT).
-
-
Constructor Detail
-
Ansi378v2004Template
public Ansi378v2004Template()
Creates new ANSI INCITS 378-2004 template.
-
Ansi378v2004Template
public Ansi378v2004Template(byte[] template)
Parses and validates ANSI INCITS 378-2004 template.- Parameters:
-
template- serialized template in ANSI INCITS 378-2004 format - Throws:
-
TemplateFormatException- if the template cannot be parsed or it fails validation
-
Ansi378v2004Template
@Deprecated public Ansi378v2004Template(byte[] template, boolean strict)
Deprecated.UseAnsi378v2004Template(byte[], ExceptionHandler)instead.Parses and optionally validates ANSI INCITS 378-2004 template.- Parameters:
-
template- serialized template in ANSI INCITS 378-2004 format -
strict-trueto validate the template,falseto tolerate parsing errors as much as possible - Throws:
-
TemplateFormatException- if the template cannot be parsed or ifstrictistrueand the template fails validation
-
Ansi378v2004Template
public Ansi378v2004Template(byte[] template, ExceptionHandler handler)Parses and optionally validates ANSI INCITS 378-2004 template.Recoverable validation exceptions encountered during parsing will be fed to the provided exception handler. Pass in
Exceptions.silence()to ignore all recoverable validation errors orExceptions.propagate()to throw exception even for recoverable errors.- Parameters:
-
template- serialized template in ANSI INCITS 378-2004 format -
handler- handler for recoverable validation exceptions - Throws:
-
TemplateFormatException- if unrecoverable validation error is encountered or the provided exception handler returnsfalse
-
-
Method Detail
-
accepts
public static boolean accepts(byte[] template)
Checks whether provided template is an ANSI INCITS 378-2004 template. This method does not do any template validation or conformance checking. It just differentiates ANSI INCITS 378-2004 from other template formats as quickly as possible, mostly by looking at template header.- Parameters:
-
template- serialized template that is to be evaluated - Returns:
-
trueiftemplateis an ANSI INCITS 378-2004 template,falseotherwise
-
toByteArray
public byte[] toByteArray()
Validates and serializes the template in ANSI INCITS 378-2004 format.- Returns:
- serialized template in ANSI INCITS 378-2004 format
- Throws:
-
TemplateFormatException- if the template fails validation
-
-