public class CVCAFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte |
CAR_TAG |
static int |
LENGTH |
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 |
---|
CVCAFile(java.io.InputStream inputStream) |
CVCAFile(short fid,
java.io.InputStream inputStream)
Constructs a new CVCA file from the data contained in an input stream.
|
CVCAFile(short fid,
java.lang.String caReference)
Constructs a new CVCA file with the given certificate reference.
|
CVCAFile(short fid,
java.lang.String caReference,
java.lang.String altCaReference)
Constructs a new CVCA file with the given certificate references.
|
CVCAFile(java.lang.String caReference,
java.lang.String altCaReference)
Constructs a new CVCA file with default file identifier.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
Tests whether this CVCAFile is equal to the provided object.
|
CVCPrincipal |
getAltCAReference()
Returns the second (alternative) CA Certificate identifier, null if none
exists.
|
CVCPrincipal |
getCAReference()
Returns the CA Certificate identifier
|
byte[] |
getEncoded()
Gets the contents of this file as byte array,
includes the ICAO tag and length.
|
short |
getFID()
Gets the file identifier of this CVCA file.
|
int |
getLength()
Gets the length of the content of this CVCA file.
|
int |
hashCode()
Computes a hash code of this CVCAFile.
|
protected void |
readObject(java.io.InputStream inputStream)
Reads the file from an input stream.
|
java.lang.String |
toString()
Gets a textual representation of this CVCAFile.
|
protected void |
writeObject(java.io.OutputStream outputStream)
Writes the file to an output stream.
|
public static final byte CAR_TAG
public static final int LENGTH
public CVCAFile(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
public CVCAFile(short fid, java.io.InputStream inputStream) throws java.io.IOException
fid
- file identifierinputStream
- stream with the data to be parsedjava.io.IOException
- on error reading from input streampublic CVCAFile(java.lang.String caReference, java.lang.String altCaReference)
caReference
- CA referencealtCaReference
- alternative CA referencepublic CVCAFile(short fid, java.lang.String caReference, java.lang.String altCaReference)
fid
- file identifiercaReference
- main CA certificate referencealtCaReference
- second (alternative) CA certificate referencepublic CVCAFile(short fid, java.lang.String caReference)
fid
- file identifiercaReference
- main CA certificate referencepublic short getFID()
protected void readObject(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the input stream to read fromjava.io.IOException
- if reading failsprotected void writeObject(java.io.OutputStream outputStream) throws java.io.IOException
outputStream
- the output stream to write tojava.io.IOException
- if writing failspublic CVCPrincipal getCAReference()
public CVCPrincipal getAltCAReference()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- some other objectpublic int hashCode()
hashCode
in class java.lang.Object
public int getLength()
public byte[] getEncoded()
getEncoded
in interface LDSElement