Package org.jmrtd.lds
Class CardAccessFile
- java.lang.Object
-
- org.jmrtd.lds.CardAccessFile
-
- All Implemented Interfaces:
Serializable
public class CardAccessFile extends Object implements 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(InputStream inputStream)
Constructs a new file from the data in an input stream.CardAccessFile(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(Object otherObj)
Tests equality with respect to another object.byte[]
getEncoded()
Returns a DER encoded of this file.Collection<SecurityInfo>
getSecurityInfos()
Returns the security infos as an unordered collection.int
hashCode()
Returns a hash code of this object.protected void
readContent(InputStream inputStream)
Reads the contents as a card access file from a stream.String
toString()
Returns the signature algorithm object identifier.protected void
writeContent(OutputStream outputStream)
Writes the contents of this file to a stream.
-
-
-
Constructor Detail
-
CardAccessFile
public CardAccessFile(Collection<SecurityInfo> securityInfos)
Constructs a new file from the provided data.- Parameters:
securityInfos
- a non-empty list of security infos
-
CardAccessFile
public CardAccessFile(InputStream inputStream) throws IOException
Constructs a new file from the data in an input stream.- Parameters:
inputStream
- the input stream to parse the data from- Throws:
IOException
- on error reading input stream
-
-
Method Detail
-
readContent
protected void readContent(InputStream inputStream) throws IOException
Reads the contents as a card access file from a stream.- Parameters:
inputStream
- the stream to read from- Throws:
IOException
- on error reading from the stream
-
writeContent
protected void writeContent(OutputStream outputStream) throws IOException
Writes the contents of this file to a stream.- Parameters:
outputStream
- the stream to write to- Throws:
IOException
- on error writing to the stream
-
getEncoded
public byte[] getEncoded()
Returns a DER encoded of this file.- Returns:
- the encoded file
-
getSecurityInfos
public Collection<SecurityInfo> getSecurityInfos()
Returns the security infos as an unordered collection.- Returns:
- security infos
-
toString
public String toString()
Returns the signature algorithm object identifier.
-
equals
public boolean equals(Object otherObj)
Tests equality with respect to another object.
-
-