I want to convert this code in java
fopen_s(&stream, "path", "w+");
w+ opens empty file with both reading and writing. If the given file exists, it’s contents are destroyed.
I am not a Java programmer, but I had a short hunt around the web and it seems Java has a
RandomAccessFile and you open it with the mode