Package org.jmrtd.lds.iso19794
Class FaceInfo
- java.lang.Object
-
- org.jmrtd.lds.AbstractLDSInfo
-
- org.jmrtd.lds.AbstractListInfo<FaceImageInfo>
-
- org.jmrtd.lds.iso19794.FaceInfo
-
- All Implemented Interfaces:
Serializable
,BiometricDataBlock
,LDSElement
public class FaceInfo extends AbstractListInfo<FaceImageInfo> implements BiometricDataBlock
A facial record consists of a facial record header and one or more facial record datas. See 5.1 of ISO 19794-5.- Version:
- $Revision: 1805 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FaceInfo(InputStream inputStream)
Constructs a face info from binary encoding.FaceInfo(List<FaceImageInfo> faceImageInfos)
Constructs a face info from a list of face image infos.FaceInfo(StandardBiometricHeader sbh, InputStream inputStream)
Constructs a face info from binary encoding.FaceInfo(StandardBiometricHeader sbh, List<FaceImageInfo> faceImageInfos)
Constructs a face info from a list of face image infos.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFaceImageInfo(FaceImageInfo faceImageInfo)
Adds a face image info to this face info.boolean
equals(Object obj)
List<FaceImageInfo>
getFaceImageInfos()
Gets the face image infos embedded in this face info.StandardBiometricHeader
getStandardBiometricHeader()
Returns the standard biometric header of this biometric data block.int
hashCode()
void
readObject(InputStream inputStream)
Reads the facial record from an input stream.void
removeFaceImageInfo(int index)
Removes a face image info from this face info.String
toString()
void
writeObject(OutputStream outputStream)
Writes the facial record to an output stream.-
Methods inherited from class org.jmrtd.lds.AbstractLDSInfo
getEncoded
-
Methods inherited from class org.jmrtd.lds.AbstractListInfo
add, addAll, getSubRecords, remove
-
-
-
-
Constructor Detail
-
FaceInfo
public FaceInfo(List<FaceImageInfo> faceImageInfos)
Constructs a face info from a list of face image infos.- Parameters:
faceImageInfos
- face image infos
-
FaceInfo
public FaceInfo(StandardBiometricHeader sbh, List<FaceImageInfo> faceImageInfos)
Constructs a face info from a list of face image infos.- Parameters:
sbh
- the standard biometric header to usefaceImageInfos
- face image infos
-
FaceInfo
public FaceInfo(InputStream inputStream) throws IOException
Constructs a face info from binary encoding.- Parameters:
inputStream
- an input stream- Throws:
IOException
- when decoding fails
-
FaceInfo
public FaceInfo(StandardBiometricHeader sbh, InputStream inputStream) throws IOException
Constructs a face info from binary encoding.- Parameters:
sbh
- the standard biometric header to useinputStream
- an input stream- Throws:
IOException
- when decoding fails
-
-
Method Detail
-
readObject
public void readObject(InputStream inputStream) throws IOException
Reads the facial record from an input stream. Note that the standard biometric header has already been read.- Specified by:
readObject
in classAbstractListInfo<FaceImageInfo>
- Parameters:
inputStream
- the input stream- Throws:
IOException
- on error reading from the stream
-
writeObject
public void writeObject(OutputStream outputStream) throws IOException
Writes the facial record to an output stream. Note that the standard biometric header (part of CBEFF structure) is not written here.- Specified by:
writeObject
in classAbstractListInfo<FaceImageInfo>
- Parameters:
outputStream
- an output stream- Throws:
IOException
- on error writing to the stream
-
getStandardBiometricHeader
public StandardBiometricHeader getStandardBiometricHeader()
Returns the standard biometric header of this biometric data block.- Specified by:
getStandardBiometricHeader
in interfaceBiometricDataBlock
- Returns:
- the standard biometric header
-
getFaceImageInfos
public List<FaceImageInfo> getFaceImageInfos()
Gets the face image infos embedded in this face info.- Returns:
- the embedded face image infos
-
addFaceImageInfo
public void addFaceImageInfo(FaceImageInfo faceImageInfo)
Adds a face image info to this face info.- Parameters:
faceImageInfo
- the face image info to add
-
removeFaceImageInfo
public void removeFaceImageInfo(int index)
Removes a face image info from this face info.- Parameters:
index
- the index of the face image info to remove
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractListInfo<FaceImageInfo>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractListInfo<FaceImageInfo>
-
-