class FileBlockRecorder implements BlockRecorder, AutoCloseable {

    public void writeBlock(Block block) {
        try {
            writer.write(formatter.format(new Date()));
            writer.write(",");
            writer.write(String.valueOf(block.getNumber()));
            writer.write(",");
            writer.write(Hex.toHexString(block.getEncoded()));
            writer.newLine();
            writer.flush();
        }
        catch (IOException ex) {
            logger.error("Exception writing block: ", ex);
        }
    }

    public  FileBlockRecorder(String filename);

}