FileDocCategorySizeDatePackage
IccIoResult.javaAPI DocAndroid 5.1 API1965Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.uicc

IccIoResult

public class IccIoResult extends Object
{@hide}

Fields Summary
public int
sw1
public int
sw2
public byte[]
payload
Constructors Summary
public IccIoResult(int sw1, int sw2, byte[] payload)

        this.sw1 = sw1;
        this.sw2 = sw2;
        this.payload = payload;
    
public IccIoResult(int sw1, int sw2, String hexString)

        this(sw1, sw2, IccUtils.hexStringToBytes(hexString));
    
Methods Summary
public IccExceptiongetException()
Returns exception on error or null if success

        if (success()) return null;

        switch (sw1) {
            case 0x94:
                if (sw2 == 0x08) {
                    return new IccFileTypeMismatch();
                } else {
                    return new IccFileNotFound();
                }
            default:
                return new IccException("sw1:" + sw1 + " sw2:" + sw2);
        }
    
public booleansuccess()
true if this operation was successful See GSM 11.11 Section 9.4 (the fun stuff is absent in 51.011)

        return sw1 == 0x90 || sw1 == 0x91 || sw1 == 0x9e || sw1 == 0x9f;
    
public java.lang.StringtoString()

        return "IccIoResponse sw1:0x" + Integer.toHexString(sw1) + " sw2:0x"
                + Integer.toHexString(sw2);