public class DG4File extends DataGroup
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
LOGGER |
EF_COM_TAG, EF_DG1_TAG, EF_DG10_TAG, EF_DG11_TAG, EF_DG12_TAG, EF_DG13_TAG, EF_DG14_TAG, EF_DG15_TAG, EF_DG16_TAG, EF_DG2_TAG, EF_DG3_TAG, EF_DG4_TAG, EF_DG5_TAG, EF_DG6_TAG, EF_DG7_TAG, EF_DG8_TAG, EF_DG9_TAG, EF_SOD_TAG
Constructor and Description |
---|
DG4File(java.io.InputStream inputStream)
Constructs a new file based on an input stream.
|
DG4File(java.util.List<IrisInfo> irisInfos)
Creates a new file with the specified records.
|
DG4File(java.util.List<IrisInfo> irisInfos,
boolean shouldAddRandomDataIfEmpty)
Creates a new file with the specified records.
|
Modifier and Type | Method and Description |
---|---|
void |
addIrisInfo(IrisInfo irisInfo)
Adds an iris info to this file.
|
boolean |
equals(java.lang.Object other) |
byte[] |
getEncoded()
Gets the contents of this file as byte array,
includes the ICAO tag and length.
|
java.util.List<IrisInfo> |
getIrisInfos()
Gets the embedded iris infos in this file.
|
int |
hashCode() |
protected void |
readContent(java.io.InputStream inputStream)
Reads the contents of the data group from an input stream.
|
void |
removeIrisInfo(int index)
Removes an iris info from this file.
|
java.lang.String |
toString()
Gets a textual representation of this file.
|
protected void |
writeContent(java.io.OutputStream outputStream)
Writes the contents of the data group to an output stream.
|
protected void |
writeOptionalRandomData(java.io.OutputStream outputStream)
Concrete implementations of EAC protected CBEFF DataGroups should call this
method at the end of their
DataGroup.writeContent(OutputStream) method to add
some random data if the record contains zero biometric templates. |
getLength, getTag, readObject, writeObject
public DG4File(java.util.List<IrisInfo> irisInfos)
irisInfos
- recordspublic DG4File(java.util.List<IrisInfo> irisInfos, boolean shouldAddRandomDataIfEmpty)
irisInfos
- recordsshouldAddRandomDataIfEmpty
- indicates whether the encoder should add random data when no templates are presentpublic DG4File(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- an input streamjava.io.IOException
- on error reading from input streamprotected void readContent(java.io.InputStream inputStream) throws java.io.IOException
DataGroup
readContent
in class DataGroup
inputStream
- the input stream to read fromjava.io.IOException
- on error reading from input streamprotected void writeContent(java.io.OutputStream outputStream) throws java.io.IOException
DataGroup
writeContent
in class DataGroup
outputStream
- the output stream to write tojava.io.IOException
- on error writing to output streampublic java.lang.String toString()
public java.util.List<IrisInfo> getIrisInfos()
public void addIrisInfo(IrisInfo irisInfo)
irisInfo
- an iris infopublic void removeIrisInfo(int index)
index
- the index of the iris info to removepublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected void writeOptionalRandomData(java.io.OutputStream outputStream) throws java.io.IOException
DataGroup.writeContent(OutputStream)
method to add
some random data if the record contains zero biometric templates.
See supplement to ICAO Doc 9303 R7-p1_v2_sIII_0057.outputStream
- the outputstreamjava.io.IOException
- on I/O errorspublic byte[] getEncoded()
getEncoded
in interface LDSElement