assertFormatted();
assertWritable();
try {
Application application = getApplication();
application.getApplicationDirectory().makeReadOnly();
application.makeReadOnly(new KeyValue(Key.B, writeKey));
writable = false;
}
catch (IOException e) {
throw new NfcException(e);
}