FileOutputStream和 OutputStreamWriter
时间: 2023-10-22 18:02:55 浏览: 86
FileOutputStream是字节流,它将数据以字节的形式写入文件。而OutputStreamWriter是字符流,它将数据以字符的形式写入文件。两者的作用是相同的,都可以将数据写入文件,只是使用的方式不同。字节流适合处理二进制文件和字节数据,而字符流适合处理文本文件和字符数据。所以根据需要选择合适的流来操作文件。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [FileOutputStream、OutputStreamWriter、BufferedWriter的区别和用法](https://blog.csdn.net/shanyikun/article/details/104515235)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [java代码-FileOutputStream与OutputStreamWriterFileInputStream与InputStreamReaderappend()函数,ready()...](https://download.csdn.net/download/weixin_38645335/20335214)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文