Class PTEID_SmartCard

    • Method Detail

      • sendAPDU

        public PTEID_ByteArray sendAPDU​(PTEID_ByteArray cmd,
                                        PTEID_Pin pin,
                                        java.lang.String csPinCode)
                                 throws PTEID_Exception
        Send an APDU command to the card and get the result.
        Parameters:
        cmd - is the apdu command
        pin - is the pin to ask for writing
        csPinCode - is the code of the pin (it will be asked if needed and not set)
        Returns:
        a PTEID_ByteArray containing the result
        Throws:
        PTEID_Exception
      • readFile

        public int readFile​(java.lang.String fileID,
                            PTEID_ByteArray in,
                            PTEID_Pin pin,
                            java.lang.String csPinCode)
                     throws PTEID_Exception
        Read a File from the card.

        If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

        Parameters:
        fileID - is the path of the file
        in - return the file
        pin - is the pin to ask for reading
        csPinCode - is the code of the pin (it will be asked if needed and not set)
        Throws:
        PTEID_Exception
      • readFile

        public int readFile​(java.lang.String fileID,
                            PTEID_ByteArray in,
                            PTEID_Pin pin)
                     throws PTEID_Exception
        Read a File from the card.

        If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

        Parameters:
        fileID - is the path of the file
        in - return the file
        pin - is the pin to ask for reading
        Throws:
        PTEID_Exception
      • readFile

        public int readFile​(java.lang.String fileID,
                            PTEID_ByteArray in)
                     throws PTEID_Exception
        Read a File from the card.

        If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

        Parameters:
        fileID - is the path of the file
        in - return the file

        Throws:
        PTEID_Exception
      • writeFile

        public boolean writeFile​(java.lang.String fileID,
                                 PTEID_ByteArray out,
                                 PTEID_Pin pin,
                                 java.lang.String csPinCode,
                                 long inOffset)
                          throws PTEID_Exception
        Write a file to the card.
        Throw PTEID_ExCmdNotAllowed exception you're not allowed to write the file.

        If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

        Parameters:
        fileID - is the path of the file
        out - contents the bytes to write
        pin - is the pin to ask for writing
        csPinCode - is the code of the pin (it will be asked if needed and not set)
        inOffset - is the offset of the data to be written to the file
        Throws:
        PTEID_Exception
      • writeFile

        public boolean writeFile​(java.lang.String fileID,
                                 PTEID_ByteArray out,
                                 PTEID_Pin pin,
                                 java.lang.String csPinCode)
                          throws PTEID_Exception
        Write a file to the card.
        Throw PTEID_ExCmdNotAllowed exception you're not allowed to write the file.

        If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

        Parameters:
        fileID - is the path of the file
        out - contents the bytes to write
        pin - is the pin to ask for writing
        csPinCode - is the code of the pin (it will be asked if needed and not set)
        Throws:
        PTEID_Exception
      • writeFile

        public boolean writeFile​(java.lang.String fileID,
                                 PTEID_ByteArray out,
                                 PTEID_Pin pin)
                          throws PTEID_Exception
        Write a file to the card.
        Throw PTEID_ExCmdNotAllowed exception you're not allowed to write the file.

        If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

        Parameters:
        fileID - is the path of the file
        out - contents the bytes to write
        pin - is the pin to ask for writing

        Throws:
        PTEID_Exception
      • writeFile

        public boolean writeFile​(java.lang.String fileID,
                                 PTEID_ByteArray out)
                          throws PTEID_Exception
        Write a file to the card.
        Throw PTEID_ExCmdNotAllowed exception you're not allowed to write the file.

        If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

        Overrides:
        writeFile in class PTEID_Card
        Parameters:
        fileID - is the path of the file
        out - contents the bytes to write


        Throws:
        PTEID_Exception