}
return baos.toByteArray();
}
private void readBlockData(KeyValue keyValue, ByteArrayOutputStream baos, int sectorId) throws IOException {
MfClassicAccess access = new MfClassicAccess(keyValue, sectorId, 0,
memoryLayout.getDataBlocksPerSector(sectorId));
MfBlock[] blocks = readerWriter.readBlock(access);
for (MfBlock block : blocks) {
baos.write(block.getData());
}