I want to write a large file, and planned to use PrintWriter.During the experiments, I found such class can only write 130k, how I can write more contents to a file?Thank you.
You are not flushing or closing the output stream when you're done. Because of that, some of the data may have not been written to the output file when the program ends.
Make sure you call out.flush() and out.close() at the end of the program.
Also close the input stream by calling in.close().