Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用的缓冲区的默认大小是FileWriter多少?直到我将文件关闭为:
FileWriter
writer.close()
缓冲区不会被刷新。那么,我做的极限是什么:
writer.write(string)
请检查https://stackoverflow.com/a/6976933/2231632
文件写入器使用 1024 字节的默认缓冲区大小。该线程还为初学者提供了关于 FileWriter 限制的足够讨论。