20230625 java.io.OutputStreamWriter
介绍
- java.io.OutputStreamWriter
- public class OutputStreamWriter extends Writer
- 主要作用是将字节流转为字符流,并指定编码格式
API
构造器
- OutputStreamWriter(OutputStream out)
- OutputStreamWriter(OutputStream out, String charsetName)
- OutputStreamWriter(OutputStream out, Charset cs)
- OutputStreamWriter(OutputStream out, CharsetEncoder enc)
- 默认字符集是
Charset.defaultCharset()
- 默认字符集是
public
- getEncoding
- 获取编码格式