public class COMFile extends AbstractTaggedLDSFile
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 |
---|
COMFile(InputStream in)
Constructs a new EF_COM file based on the encoded
value in
in . |
COMFile(String ldsVer,
String unicodeVer,
int[] tagList)
Constructs a new COM file.
|
COMFile(String versionLDS,
String updateLevelLDS,
String majorVersionUnicode,
String minorVersionUnicode,
String releaseLevelUnicode,
int[] tagList)
Constructs a new COM file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Whether other is equal to this file.
|
byte[] |
getEncoded()
Gets the contents of this file as byte array,
includes the ICAO tag and length.
|
String |
getLDSVersion()
Gets the LDS version as a dot seperated string
containing version and update level.
|
int[] |
getTagList()
Gets the ICAO datagroup tags as a list of bytes.
|
String |
getUnicodeVersion()
Gets the unicode version as a dot seperated string
containing major version, minor version, and release level.
|
int |
hashCode() |
void |
insertTag(Integer tag)
Inserts a tag in a proper place if not already present
|
protected void |
readContent(InputStream in)
Reads the contents of the data group from an input stream.
|
String |
toString()
Gets a textual representation of this file.
|
protected void |
writeContent(OutputStream out)
Writes the contents of the data group to an output stream.
|
getLength, getTag, readObject, writeObject
public COMFile(String versionLDS, String updateLevelLDS, String majorVersionUnicode, String minorVersionUnicode, String releaseLevelUnicode, int[] tagList)
versionLDS
- a numerical string of length 2updateLevelLDS
- a numerical string of length 2majorVersionUnicode
- a numerical string of length 2minorVersionUnicode
- a numerical string of length 2releaseLevelUnicode
- a numerical string of length 2tagList
- a list of ICAO data group tagsIllegalArgumentException
- if the input is not well-formedpublic COMFile(String ldsVer, String unicodeVer, int[] tagList)
ldsVer
- a "x.y" version numberunicodeVer
- a "x.y.z" version numbertagList
- list of tagspublic COMFile(InputStream in) throws IOException
in
.in
- should contain a TLV object with appropriate
tag and contentsIOException
- if the input could not be decodedprotected void readContent(InputStream in) throws IOException
AbstractTaggedLDSFile
readContent
in class AbstractTaggedLDSFile
in
- the input stream to read fromIOException
- on error reading from input streampublic String getLDSVersion()
public String getUnicodeVersion()
public int[] getTagList()
public void insertTag(Integer tag)
tag
- tag to insertprotected void writeContent(OutputStream out) throws IOException
AbstractTaggedLDSFile
writeContent
in class AbstractTaggedLDSFile
out
- the output stream to write toIOException
- on error writing to output streampublic String toString()
toString
in class AbstractTaggedLDSFile
public boolean equals(Object other)
public byte[] getEncoded()
getEncoded
in interface LDSElement
Copyright © 2016. All rights reserved.