private void writeFile(byte[] bytes) {
        Path parent = path.getParent();
        if (parent != null) uncheck(() -> Files.createDirectories(parent));
        uncheck(() -> Files.write(path, bytes));
    }
Java API for a flag database stored in a single file

@author hakonhall
flags/src/main/java/com/yahoo/vespa/flags/file/FlagDbFile.java