src/com/makina/security/OpenFIPS201/OpenFIPS201.java
private void processPIV_GET_DATA(APDU apdu) {

        final byte P1 = (byte)0x3F;
        final byte P2 = (byte)0xFF;

        byte[] buffer = apdu.getBuffer();
        short length = (short)(buffer[ISO7816.OFFSET_LC] & 0xFF);

        /*
         * PRE-CONDITIONS
         */

        // PRE-CONDITION 1 - The P1 value must be equal to the constant '3F'
        if (buffer[ISO7816.OFFSET_P1] != P1) {
            ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);
        }

        // PRE-CONDITION 2 - The P2 value must be equal to the constant 'FF'
        if (buffer[ISO7816.OFFSET_P2] != P2) {
            ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);
        }

        /*
         * EXECUTION STEPS
         */

        // STEP 1 - Call the PIV 'GET DATA' command
        piv.getData(buffer, ISO7816.OFFSET_CDATA, length);

        // NOTE: If no exception occurred during processing, the ChainBuffer now contains a reference
        //		 to a data object to write to the client.

        // STEP 2 - Process the first frame of the chainBuffer for this response
        chainBuffer.processOutgoing(apdu);
    }
/**
     * Process the PIV 'GET DATA' command
     *
     * @param apdu The incoming APDU object
     */
Process the PIV 'GET DATA' command
@param apdu The incoming APDU object
Process the PIV ' GET DATA ' command @param apdu The incoming APDU object
private void processPIV_GET_DATA(APDU apdu) {
        final byte P1 = (byte)0x3F;
        final byte P2 = (byte)0xFF;
        byte[] buffer = apdu.getBuffer();
        short length = (short)(buffer[ISO7816.OFFSET_LC] & 0xFF);
        /*
         * PRE-CONDITIONS
         */
        if (buffer[ISO7816.OFFSET_P1] != P1) {
            ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);
        }
        if (buffer[ISO7816.OFFSET_P2] != P2) {
            ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);
        }
        /*
         * EXECUTION STEPS
         */
        piv.getData(buffer, ISO7816.OFFSET_CDATA, length);
        chainBuffer.processOutgoing(apdu);
    }
private void processPIV_GET_DATA ( APDU apdu ) { final byte P1 = ( byte ) 0x3F ; final byte P2 = ( byte ) 0xFF ; byte [ ] buffer = apdu . getBuffer ( ) ; short length = ( short ) ( buffer [ ISO7816 . OFFSET_LC ] & 0xFF ) ; /*
         * PRE-CONDITIONS
         */ if ( buffer [ ISO7816 . OFFSET_P1 ] != P1 ) { ISOException . throwIt ( ISO7816 . SW_INCORRECT_P1P2 ) ; } if ( buffer [ ISO7816 . OFFSET_P2 ] != P2 ) { ISOException . throwIt ( ISO7816 . SW_INCORRECT_P1P2 ) ; } /*
         * EXECUTION STEPS
         */ piv . getData ( buffer , ISO7816 . OFFSET_CDATA , length ) ; chainBuffer . processOutgoing ( apdu ) ; }
Process the PIV 'GET DATA' command
 @param apdu The incoming APDU object
Process the PIV ' GET DATA ' command @param apdu The incoming APDU object
// PRE-CONDITION 1 - The P1 value must be equal to the constant '3F' // PRE-CONDITION 2 - The P2 value must be equal to the constant 'FF' // STEP 1 - Call the PIV 'GET DATA' command // NOTE: If no exception occurred during processing, the ChainBuffer now contains a reference //		 to a data object to write to the client. // STEP 2 - Process the first frame of the chainBuffer for this response