Ask Your Question
3

What is the alternative solution for FileWriter, which does not write all its content due to the maximum limit?

asked 2021-06-04 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-03-25 22:00:00 +0000

nofretete gravatar image

One alternative solution for FileWriter, which does not write all its content due to the maximum limit, is to use BufferedWriter with a specified buffer size. This allows data to be written in chunks, ensuring that the maximum limit is not exceeded. Additionally, it provides better performance by reducing the number of I/O operations needed to write data. Another alternative solution is to use RandomAccessFile, which provides methods for reading and writing data to a file at a specific position, allowing the file to be accessed and modified without completely rewriting it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-06-04 11:00:00 +0000

Seen: 3 times

Last updated: Mar 25 '22