Package org.jmrtd.lds
Class DisplayedImageDataGroup
- java.lang.Object
-
- org.jmrtd.lds.AbstractTaggedLDSFile
-
- org.jmrtd.lds.DataGroup
-
- org.jmrtd.lds.DisplayedImageDataGroup
-
- All Implemented Interfaces:
Serializable
,LDSElement
,LDSFile
public abstract class DisplayedImageDataGroup extends DataGroup
File structure image template files that can be displayed. Abstract super class for ICAO LDS EF_DG5 - EF_DG7.- Version:
- $Revision: 1775 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.jmrtd.lds.LDSFile
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 Summary
Constructors Constructor Description DisplayedImageDataGroup(int dataGroupTag, InputStream inputStream)
Constructs a displayed image data group from binary representation.DisplayedImageDataGroup(int dataGroupTag, List<DisplayedImageInfo> imageInfos, int displayedImageTagToUse)
Constructs a displayed image data group from a list of displayed images.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
byte[]
getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.List<DisplayedImageInfo>
getImages()
Gets the image infos.int
hashCode()
protected void
readContent(InputStream inputStream)
Reads the contents of the data group from an input stream.String
toString()
Gets a textual representation of this file.protected void
writeContent(OutputStream outputStream)
Writes the contents of this structure to a stream.-
Methods inherited from class org.jmrtd.lds.AbstractTaggedLDSFile
getLength, getTag, readObject, writeObject
-
-
-
-
Constructor Detail
-
DisplayedImageDataGroup
public DisplayedImageDataGroup(int dataGroupTag, List<DisplayedImageInfo> imageInfos, int displayedImageTagToUse)
Constructs a displayed image data group from a list of displayed images. The list should not benull
or containnull
valued displayed images.- Parameters:
dataGroupTag
- a tag indicating DG5, DG6, or DG7imageInfos
- a list of displayed imagesdisplayedImageTagToUse
- a tag indicating Portrait or Signature or mark
-
DisplayedImageDataGroup
public DisplayedImageDataGroup(int dataGroupTag, InputStream inputStream) throws IOException
Constructs a displayed image data group from binary representation.- Parameters:
dataGroupTag
- a tag indicating DG5, DG6, or DG7inputStream
- an input stream- Throws:
IOException
- on error reading the input stream
-
-
Method Detail
-
readContent
protected void readContent(InputStream inputStream) throws IOException
Description copied from class:AbstractTaggedLDSFile
Reads the contents of the data group from an input stream. Client code implementing this method should only read the contents from the input stream, not the tag or length of the data group.- Specified by:
readContent
in classAbstractTaggedLDSFile
- Parameters:
inputStream
- the input stream to read from- Throws:
IOException
- on error reading from input stream
-
writeContent
protected void writeContent(OutputStream outputStream) throws IOException
Writes the contents of this structure to a stream.- Specified by:
writeContent
in classAbstractTaggedLDSFile
- Parameters:
outputStream
- the stream to write to- Throws:
IOException
- on error writing to the stream
-
toString
public String toString()
Description copied from class:DataGroup
Gets a textual representation of this file.
-
getImages
public List<DisplayedImageInfo> getImages()
Gets the image infos.- Returns:
- images
-
getEncoded
public byte[] getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.- Specified by:
getEncoded
in interfaceLDSElement
- Returns:
- a byte array containing the file
-
-