Buffered Writer Java Limit / Issues

2019-08-26 02:44发布

问题:

I have a buffered writer that is writing to a text file. For some reason the writer stops writing a long string about half way through. Are there any known issues with using the buffered Writer in java?

回答1:

Are you closing the writer?

writer.close();


回答2:

Before writing large text into file, use obj_BufferedWriter.flush().