I've captured a featureset in the form of a string using an applet. I need to convert that string back into bytes and deserialize it in order to match it. But I dont know where am going wrong as its not comparing the template with the featureset. I've been fighting with this for weeks, Please anyone help me.
//Converting string stored in db back to template:
byte[] byteArray = new byte[1];
byteArray = hexStringToByteArray(dbTemplate);
DPFPTemplate template = DPFPGlobal.getTemplateFactory().createTemplate();
template.deserialize(byteArray);
//Converting featureset string captured by applet
byte[] fsArray = new byte[1];
fsArray = hexStringToByteArray(ftsetstring);
DPFPFeatureSet features = null;
features.deserialize(fsArray);
//Comparing template with features acquired
DPFPVerification matcher = DPFPGlobal.getVerificationFactory().createVerification();
DPFPVerificationResult fresult = matcher.verify(features, template);
if (fresult.isVerified()) {
return "The fingerprint was VERIFIED.";
} else {
return "The fingerprint was NOT VERIFIED.";
Where is my error???
I've never used Digital Persona before, but in any API, this:
DPFPFeatureSet features = null;
features.deserialize(fsArray);
Will cause a NullPointerException
. I tried to look up how to correctly use the class but you have to be a member of Digital Persona to see the javadoc. Sorry!