Code example for IOException

0
        Bundle b;
        try { 
            b = mExtras.getService().transceive(mExtras.mPackageName, in);
        } catch (RemoteException e) {
            mExtras.attemptDeadServiceRecovery(e);
            throw new IOException("NFC Service was dead, need to re-open");
        } 
        throwBundle(b);
        return b.getByteArray("out");
    } 
 
    private static void throwBundle(Bundle b) throws EeIOException {
        switch (b.getInt("e")) {
            case EE_ERROR_NFC_DISABLED:
                throw new EeNfcDisabledException(b.getString("m"));
            case EE_ERROR_IO:
                throw new EeIOException(b.getString("m"));
            case EE_ERROR_INIT:
                throw new EeInitializationException(b.getString("m"));
            case EE_ERROR_EXT_FIELD:
                throw new EeExternalFieldException(b.getString("m"));