protected void extractEF_ID ( final Application pApplication ) throws CommunicationException { // 00B201BC00 byte [ ] data = template . get ( ) . getProvider ( ) . transceive ( new CommandApdu ( CommandEnum . READ_RECORD , 0x01 , 0xBC , 0 ) . toBytes ( ) ) ; if ( ResponseUtils . isSucceed ( data ) ) { pApplication . setReadingStep ( ApplicationStepEnum . READ ) ; // Date SimpleDateFormat format = new SimpleDateFormat ( "MM/yy" , Locale . getDefault ( ) ) ; // Track 2 EmvTrack2 track2 = new EmvTrack2 ( ) ; track2 . setCardNumber ( BytesUtils . bytesToStringNoSpace ( Arrays . copyOfRange ( data , 4 , 9 ) ) ) ; try { track2 . setExpireDate ( format . parse ( String . format ( "%02x/%02x" , data [ 11 ] , data [ 10 ] ) ) ) ; } catch ( ParseException e ) { LOGGER . error ( e . getMessage ( ) , e ) ; } template . get ( ) . getCard ( ) . setTrack2 ( track2 ) ; } }
Method used to extract Ef_iD record