class SingleWriterMultipleReaderFile {

    public void finishWrite(FileOutputStream stream) throws IOException {
        try {
            stream.close();
        } catch (IOException e) {
            failWrite(stream);
            throw e;
        }

        if (!workFile.renameTo(activeFile)) {
            failWrite(stream);
            throw new IOException("Cannot commit transaction");
        }
    }

    public  SingleWriterMultipleReaderFile(File file);

}