Package org.jmrtd.lds

Class CardAccessFile

    • 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
      • getSecurityInfos

        public Collection<SecurityInfo> getSecurityInfos()
        Returns the security infos as an unordered collection.
        Returns:
        security infos
      • toString

        public String toString()
        Gets the signature algorithm object identifier.
        Overrides:
        toString in class Object
        Returns:
        signature algorithm OID
      • equals

        public boolean equals​(Object otherObj)
        Tests equality with respect to another object.
        Overrides:
        equals in class Object
        Parameters:
        otherObj - another object
        Returns:
        whether this object equals the other object
      • hashCode

        public int hashCode()
        Gets a hash code of this object.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code