Module com.machinezoo.fingerprintio
Class Iso19794p2v2011Template
- java.lang.Object
-
- com.machinezoo.fingerprintio.iso19794p2v2011.Iso19794p2v2011Template
-
public class Iso19794p2v2011Template extends Object
ISO/IEC 19794-2:2011 off-card template.- See Also:
- ISO/IEC 19794-2:2011 Summary
-
-
Field Summary
Fields Modifier and Type Field Description List<Iso19794p2v2011Fingerprint>fingerprintsList of fingerprints (FINGERPRINT).
-
Constructor Summary
Constructors Constructor Description Iso19794p2v2011Template()Creates new ISO/IEC 19794-2:2011 off-card template.Iso19794p2v2011Template(byte[] template)Parses and validates ISO/IEC 19794-2:2011 off-card template.Iso19794p2v2011Template(byte[] template, boolean strict)Deprecated.UseIso19794p2v2011Template(byte[], ExceptionHandler)instead.Iso19794p2v2011Template(byte[] template, ExceptionHandler handler)Parses and optionally validates ISO/IEC 19794-2:2011 off-card 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 ISO/IEC 19794-2:2011 off-card template.byte[]toByteArray()Validates and serializes the template in ISO/IEC 19794-2:2011 off-card format.
-
-
-
Field Detail
-
fingerprints
public List<Iso19794p2v2011Fingerprint> fingerprints
List of fingerprints (FINGERPRINT).
-
-
Constructor Detail
-
Iso19794p2v2011Template
public Iso19794p2v2011Template()
Creates new ISO/IEC 19794-2:2011 off-card template.
-
Iso19794p2v2011Template
public Iso19794p2v2011Template(byte[] template)
Parses and validates ISO/IEC 19794-2:2011 off-card template.- Parameters:
-
template- serialized template in ISO/IEC 19794-2:2011 off-card format - Throws:
-
TemplateFormatException- if the template cannot be parsed or it fails validation
-
Iso19794p2v2011Template
@Deprecated public Iso19794p2v2011Template(byte[] template, boolean strict)
Deprecated.UseIso19794p2v2011Template(byte[], ExceptionHandler)instead.Parses and optionally validates ISO/IEC 19794-2:2011 off-card template.- Parameters:
-
template- serialized template in ISO/IEC 19794-2:2011 off-card 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
-
Iso19794p2v2011Template
public Iso19794p2v2011Template(byte[] template, ExceptionHandler handler)Parses and optionally validates ISO/IEC 19794-2:2011 off-card 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 ISO/IEC 19794-2:2011 off-card 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 ISO/IEC 19794-2:2011 off-card template. This method does not do any template validation or conformance checking. It just differentiates off-card ISO/IEC 19794-2:2011 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 ISO/IEC 19794-2:2011 off-card template,falseotherwise
-
toByteArray
public byte[] toByteArray()
Validates and serializes the template in ISO/IEC 19794-2:2011 off-card format.- Returns:
- serialized template in ISO/IEC 19794-2:2011 off-card format
- Throws:
-
TemplateFormatException- if the template fails validation
-
-