Package org.jmrtd.lds
Class CardAccessFile
- java.lang.Object
-
- org.jmrtd.lds.CardAccessFile
-
- All Implemented Interfaces:
java.io.Serializable
public class CardAccessFile extends java.lang.Object implements java.io.Serializable
Card access file stores a set of SecurityInfos for PACE.- Since:
- 0.5.1
- Version:
- $Revision: 1850 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CardAccessFile(java.io.InputStream inputStream)
Constructs a new file from the data in an input stream.CardAccessFile(java.util.Collection<SecurityInfo> securityInfos)
Constructs a new file from the provided data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object otherObj)
Tests equality with respect to another object.byte[]
getEncoded()
Returns a DER encoded of this file.java.util.Collection<SecurityInfo>
getSecurityInfos()
Returns the security infos as an unordered collection.int
hashCode()
Returns a hash code of this object.protected void
readContent(java.io.InputStream inputStream)
Reads the contents as a card access file from a stream.java.lang.String
toString()
Returns the signature algorithm object identifier.protected void
writeContent(java.io.OutputStream outputStream)
Writes the contents of this file to a stream.
-
-
-
Constructor Detail
-
CardAccessFile
public CardAccessFile(java.util.Collection<SecurityInfo> securityInfos)
Constructs a new file from the provided data.- Parameters:
securityInfos
- a non-empty list of security infos
-
CardAccessFile
public CardAccessFile(java.io.InputStream inputStream) throws java.io.IOException
Constructs a new file from the data in an input stream.- Parameters:
inputStream
- the input stream to parse the data from- Throws:
java.io.IOException
- on error reading input stream
-
-
Method Detail
-
readContent
protected void readContent(java.io.InputStream inputStream) throws java.io.IOException
Reads the contents as a card access file from a stream.- Parameters:
inputStream
- the stream to read from- Throws:
java.io.IOException
- on error reading from the stream
-
writeContent
protected void writeContent(java.io.OutputStream outputStream) throws java.io.IOException
Writes the contents of this file to a stream.- Parameters:
outputStream
- the stream to write to- Throws:
java.io.IOException
- on error writing to the stream
-
getEncoded
public byte[] getEncoded()
Returns a DER encoded of this file.- Returns:
- the encoded file
-
getSecurityInfos
public java.util.Collection<SecurityInfo> getSecurityInfos()
Returns the security infos as an unordered collection.- Returns:
- security infos
-
toString
public java.lang.String toString()
Returns the signature algorithm object identifier.- Overrides:
toString
in classjava.lang.Object
- Returns:
- signature algorithm OID
-
equals
public boolean equals(java.lang.Object otherObj)
Tests equality with respect to another object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
otherObj
- another object- Returns:
- whether this object equals the other object
-
hashCode
public int hashCode()
Returns a hash code of this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the hash code
-
-