class DocViewFormat {

    public boolean format(File file, boolean dryRun) throws IOException {
        CRC32 originalCrc32 = new CRC32();
        CRC32 formattedCrc32 = new CRC32();
        byte[] formatted = format(file, originalCrc32, formattedCrc32);

        final boolean changed = originalCrc32.getValue() != formattedCrc32.getValue();
        if (changed && !dryRun) {
            try (OutputStream out = new BufferedOutputStream(new FileOutputStream(file))) {
                IOUtils.copy(new ByteArrayInputStream(formatted), out);
            }
        }
        return changed;
    }

    public  DocViewFormat();

}