Some ideas for how to handle file reading and writing on the Java side