public abstract class AbstractTaggedLDSFile extends 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 |
AbstractTaggedLDSFile(int dataGroupTag)
Constructs a data group.
|
protected |
AbstractTaggedLDSFile(int tag,
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(InputStream inputStream)
Reads the contents of the data group from an input stream.
|
protected void |
readObject(InputStream inputStream)
Reads the contents of this data group, including tag and length from an input stream.
|
String |
toString()
Gets a textual representation of this file.
|
protected abstract void |
writeContent(OutputStream outputStream)
Writes the contents of the data group to an output stream.
|
protected void |
writeObject(OutputStream outputStream)
Writes the file to an output stream.
|
protected AbstractTaggedLDSFile(int dataGroupTag)
dataGroupTag
- data group tagprotected AbstractTaggedLDSFile(int tag, InputStream inputStream) throws IOException
tag
- the taginputStream
- an input streamIOException
- on error reading input streamprotected void readObject(InputStream inputStream) throws IOException
inputStream
- the stream to read fromIOException
- if reading from the stream failsprotected void writeObject(OutputStream outputStream) throws IOException
outputStream
- the output stream to write toIOException
- if writing failsprotected abstract void readContent(InputStream inputStream) throws IOException
inputStream
- the input stream to read fromIOException
- on error reading from input streamprotected abstract void writeContent(OutputStream outputStream) throws IOException
outputStream
- the output stream to write toIOException
- on error writing to output streampublic String toString()
public int getTag()
public int getLength()
public byte[] getEncoded()
getEncoded
in interface LDSElement
Copyright © 2017. All rights reserved.