public static Type2NdefOperations getType2BlankTag(String fileName, boolean formatted, boolean writable) {
try {
InMemoryTag tag = new InMemoryTag(FileMfUlReader.loadCardFromFile(fileName));
AcrMfUlReaderWriter readerWriter = new AcrMfUlReaderWriter(tag);
return new Type2NdefOperations(fileName.startsWith("mful_") ? MemoryLayout.ULTRALIGHT
: MemoryLayout.ULTRALIGHT_C, readerWriter, readerWriter.getTagInfo(), formatted, writable);
}
catch (IOException e) {
throw new RuntimeException(e);
}