Package org.jmrtd.lds
Class DataGroup
- java.lang.Object
-
- org.jmrtd.lds.AbstractTaggedLDSFile
-
- org.jmrtd.lds.DataGroup
-
- All Implemented Interfaces:
Serializable
,LDSElement
,LDSFile
- Direct Known Subclasses:
CBEFFDataGroup
,DG11File
,DG12File
,DG14File
,DG15File
,DG1File
,DisplayedImageDataGroup
public abstract class DataGroup extends AbstractTaggedLDSFile
Base class for data group files.- Version:
- $Revision: 1808 $
- 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 Modifier Constructor Description protected
DataGroup(int dataGroupTag)
Constructs a data group.protected
DataGroup(int dataGroupTag, InputStream inputStream)
Constructs a data group from the DER encoded data in the given input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.String
toString()
Returns a textual representation of this file.-
Methods inherited from class org.jmrtd.lds.AbstractTaggedLDSFile
getLength, getTag, readContent, readObject, writeContent, writeObject
-
-
-
-
Constructor Detail
-
DataGroup
protected DataGroup(int dataGroupTag)
Constructs a data group. This constructor is only visible to the other classes in this package.- Parameters:
dataGroupTag
- data group tag
-
DataGroup
protected DataGroup(int dataGroupTag, InputStream inputStream) throws IOException
Constructs a data group from the DER encoded data in the given input stream. Tag and length are read, so the input stream is positioned just before the value.- Parameters:
dataGroupTag
- data group taginputStream
- an input stream- Throws:
IOException
- on error reading input stream
-
-
Method Detail
-
toString
public String toString()
Returns a textual representation of this file.- Overrides:
toString
in classAbstractTaggedLDSFile
- Returns:
- a textual representation of this file
-
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
-
-