public abstract class DataGroup
extends java.lang.Object
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
Modifier | Constructor and Description |
---|---|
protected |
DataGroup(int dataGroupTag,
java.io.InputStream inputStream)
Constructs a data group from the DER encoded data in the
given input stream.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getEncoded()
Gets the contents of this file as byte array,
includes the ICAO tag and length.
|
int |
getLength()
The length of the value of the data group.
|
int |
getTag()
The data group tag.
|
protected abstract void |
readContent(java.io.InputStream inputStream)
Reads the contents of the data group from an input stream.
|
protected void |
readObject(java.io.InputStream inputStream)
Reads the contents of this data group, including tag and length from an input stream.
|
java.lang.String |
toString()
Gets a textual representation of this file.
|
protected abstract void |
writeContent(java.io.OutputStream outputStream)
Writes the contents of the data group to an output stream.
|
protected void |
writeObject(java.io.OutputStream outputStream)
Writes the file to an output stream.
|
protected DataGroup(int dataGroupTag, java.io.InputStream inputStream) throws java.io.IOException
dataGroupTag
- data group taginputStream
- an input streamjava.io.IOException
- on error reading input streamprotected void readObject(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the stream to read fromjava.io.IOException
- if reading from the stream failsprotected void writeObject(java.io.OutputStream outputStream) throws java.io.IOException
outputStream
- the output stream to write tojava.io.IOException
- if writing failsprotected abstract void readContent(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the input stream to read fromjava.io.IOException
- on error reading from input streamprotected abstract void writeContent(java.io.OutputStream outputStream) throws java.io.IOException
outputStream
- the output stream to write tojava.io.IOException
- on error writing to output streampublic java.lang.String toString()
toString
in class java.lang.Object
public int getTag()
public int getLength()
public byte[] getEncoded()
getEncoded
in interface LDSElement