Now I'd like to be sure that the content is written to disk. Normally I'd strace the programm and look for the fsync call but for some reason that didn't work. I also tried a
OutputStream os = ... ... os.flush(); os.getFD().sync(); os.close();
but again, strace didn't show any fsync calls.