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