Package com.appliedrec.verid.core2
Class FaceTemplate
- java.lang.Object
-
- com.appliedrec.verid.core2.FaceTemplate
-
- All Implemented Interfaces:
android.os.Parcelable,IRecognizable
public class FaceTemplate extends java.lang.Object implements android.os.Parcelable, IRecognizable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFaceTemplate.UnsupportedVersionErrorstatic classFaceTemplate.VersionDeprecated.
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<FaceTemplate>CREATOR
-
Constructor Summary
Constructors Constructor Description FaceTemplate(byte[] data, int version, byte[] hash, java.lang.String userId, byte[] iv)FaceTemplate(byte[] data, int version, java.lang.String userId)FaceTemplate(byte[] data, int version, java.lang.String userId, byte[] iv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.byte[]getData()VerIDFaceTemplateVersiongetFaceTemplateVersion()byte[]getHash()byte[]getIv()byte[]getRecognitionData()RecognizableTypegetType()java.lang.StringgetUserId()intgetVersion()booleanisCompatibleWithVersion(int version)booleanisEncrypted()booleanisEqualTo(FaceTemplate otherTemplate)voidsetHash(byte[] hash)voidsetIv(byte[] iv)voidsetRecognitionData(byte[] data)voidsetUserId(java.lang.String userId)voidsetVersion(int version)java.lang.StringtoJSON()java.lang.StringtoString()voidwriteToParcel(android.os.Parcel dest, int flags)Flatten this object in to a Parcel.
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<FaceTemplate> CREATOR
-
-
Constructor Detail
-
FaceTemplate
public FaceTemplate(byte[] data, int version, java.lang.String userId) throws VerIDCoreException- Throws:
VerIDCoreException
-
FaceTemplate
public FaceTemplate(byte[] data, int version, java.lang.String userId, @Nullable byte[] iv) throws VerIDCoreException- Throws:
VerIDCoreException
-
FaceTemplate
public FaceTemplate(byte[] data, int version, byte[] hash, java.lang.String userId, @Nullable byte[] iv)
-
-
Method Detail
-
describeContents
public int describeContents()
Description copied from interface:android.os.ParcelableDescribe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output ofParcelable.writeToParcel(Parcel, int), the return value of this method must include theParcelable.CONTENTS_FILE_DESCRIPTORbit.- Specified by:
describeContentsin interfaceandroid.os.Parcelable- Returns:
- a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)Description copied from interface:android.os.ParcelableFlatten this object in to a Parcel.- Specified by:
writeToParcelin interfaceandroid.os.Parcelable- Parameters:
dest- The Parcel in which the object should be written.flags- Additional flags about how the object should be written. May be 0 orParcelable.PARCELABLE_WRITE_RETURN_VALUE.
-
getData
public byte[] getData()
-
getRecognitionData
public byte[] getRecognitionData()
- Specified by:
getRecognitionDatain interfaceIRecognizable- Returns:
- Face recognition data
-
setRecognitionData
public void setRecognitionData(byte[] data)
-
getVersion
public int getVersion()
- Specified by:
getVersionin interfaceIRecognizable- Returns:
- Version used to determine compatibility
-
setVersion
public void setVersion(int version)
-
getType
public RecognizableType getType()
- Specified by:
getTypein interfaceIRecognizable- Returns:
- Type of recognizable data this object contains
-
isEqualTo
public boolean isEqualTo(FaceTemplate otherTemplate)
-
toJSON
@NonNull public java.lang.String toJSON() throws org.json.JSONException- Throws:
org.json.JSONException
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getHash
public byte[] getHash()
-
getUserId
public java.lang.String getUserId()
-
setHash
public void setHash(@NonNull byte[] hash)
-
setUserId
public void setUserId(java.lang.String userId)
-
getIv
public byte[] getIv()
-
setIv
public void setIv(@NonNull byte[] iv)
-
isEncrypted
public boolean isEncrypted()
-
isCompatibleWithVersion
public boolean isCompatibleWithVersion(int version)
-
getFaceTemplateVersion
public VerIDFaceTemplateVersion getFaceTemplateVersion()
-
-