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.
我使用BufferedWriter将文件写入SD卡。之后我想覆盖文件的标题,但其他数据必须没有更改(在标题中我必须添加文件大小)。所以我想我必须改变我需要写的位置。
我该怎么做?我应该使用什么功能?
您可以使用RandomAccessFile访问文件并对其进行修改。