基本的io流主要是java.io.OutputStream,java.io.InputStream,Writer,Reader
1、从字节流向字符流转化中Reader的 InputStreamReader和OutputStreamReader起着重要的作用。
另外 Reader reader = (new InputSource(InputStream input)).getCharacterStream();
2、从字符流向字节流转化
InputStream is = (new InputSource(Reader reader)).getByteStream();
java.io.Reader
BufferedReader //new BufferedReader(new FileReader(filePath))
InputStreamReader //InputStreamReader(InputStream in) ,InputStreamReader(InputStream in, CharsetDecoder dec)
java.io.Writer
BufferedWriter //new BufferedWriter(new FilterWriter(filePath))
OutputStreamWriter
PrintWriter //PrintWriter(OutputStream out), PrintWriter(Writer out, boolean autoFlush)
【注】