static RandomAccessFile newRandomAccessFile(File path, S mode) throws IOException { mkdirsForFile(f); RandomAccessFile f = new RandomAccessFile(path, mode); callJavaX("registerIO", f, path, mode.indexOf('w') >= 0); ret f; }