Java中的IO分为两大线,字节流和字符流
字节流基类:InputStream/OutputStream 操作byte[]的
I部分:
public abstract int read() throws IOException;
?
O部分:
public abstract void write(int b) throws IOException;
?
字符流基类:Reader/Writer?操作char[]的
I部分:
abstract public void close() throws IOException; abstract public int read(char cbuf[], int off, int len) throws IOException;
O部分:
abstract public void write(char cbuf[], int off, int len) throws IOException; abstract public void flush() throws IOException; abstract public void close() throws IOException;
?
转换桥梁:
InputStreamReader和OutputStreamWriter
?
原文:http://snv.iteye.com/blog/2194005