Code example for AccessControlException

0
    } 
 
    public void checkLengthAndStatus(int length, int sw1sw2, String message)
            throws AccessControlException { 
        if (getSW1SW2() != sw1sw2 || mData.length != length) {
            throw new AccessControlException("ResponseApdu is wrong at " + message);
        } 
    } 
 
    public void checkLengthAndStatus(int length, int[] sw1sw2List, String message)
            throws AccessControlException { 
        if (mData.length != length) {
            throw new AccessControlException("ResponseApdu is wrong at " + message);
        } 
        for (int sw1sw2 : sw1sw2List) {
            if (getSW1SW2() == sw1sw2) {
                return; // sw1sw2 matches => return 
            } 
        } 
        throw new AccessControlException("ResponseApdu is wrong at " + message);
Contextual code suggestions in your IDE  Get Codota for Java