Class 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 class  FaceTemplate.UnsupportedVersionError  
      static class  FaceTemplate.Version
      Deprecated.
      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.ContentsFlags, android.os.Parcelable.Creator<T>, android.os.Parcelable.Stability, android.os.Parcelable.WriteFlags
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static android.os.Parcelable.Creator<FaceTemplate> CREATOR  
      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_STABILITY_LOCAL, PARCELABLE_STABILITY_VINTF, PARCELABLE_WRITE_RETURN_VALUE
    • 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)  
    • Field Detail

      • CREATOR

        public static final android.os.Parcelable.Creator<FaceTemplate> CREATOR
    • Constructor Detail

      • 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.Parcelable
        Describe 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 of Parcelable.writeToParcel(Parcel, int), the return value of this method must include the Parcelable.CONTENTS_FILE_DESCRIPTOR bit.
        Specified by:
        describeContents in interface android.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.Parcelable
        Flatten this object in to a Parcel.
        Specified by:
        writeToParcel in interface android.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 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
      • getData

        public byte[] getData()
      • setRecognitionData

        public void setRecognitionData​(byte[] data)
      • getVersion

        public int getVersion()
        Specified by:
        getVersion in interface IRecognizable
        Returns:
        Version used to determine compatibility
      • setVersion

        public void setVersion​(int version)
      • 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:
        toString in class java.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)