private void writeBlob(ByteBuffer blob, String relativePath) {
        try (FileOutputStream fos = new FileOutputStream(new File(appPath.toFile(), relativePath))) {
            if (relativePath.endsWith(".lz4")) {
                LZ4FrameOutputStream lz4 = new LZ4FrameOutputStream(fos);
                lz4.write(blob.array(), blob.arrayOffset(), blob.remaining());
                lz4.close();
            } else {
                fos.write(blob.array(), blob.arrayOffset(), blob.remaining());
            }
        } catch (IOException e) {
            throw new IllegalArgumentException("Failed writing temp file", e);
        }
    }
FileAcquirer and FileRegistry working on a local directory.

@author Tony Vaagenes
@author ollivir
standalone-container/src/main/java/com/yahoo/container/standalone/LocalFileDb.java