nputStream类 abstract int read()throws IOException int read(byte b[])throws IOException void close()throws IOException void available()throws IOException void skip()throws IOException ©2006计算机系杨厚群 All rights lefts reserved
©2006 计算机系 杨厚群 All rights & lefts reserved. InputStream类 abstract int read() throws IOException int read(byte b[]) throws IOException void close() throws IOException void available() throws IOException void skip() throws IOException
Reader类 Reader类与InputStream类似。在Reader类中的 方法处理的是字符 abstract int read()throws IOException int read (char b[])throws IOException void close()throws IOException void skip(throws IOException ©2006计算机系杨厚群 All rights &lefts reserved
©2006 计算机系 杨厚群 All rights & lefts reserved. Reader类 Reader类与InputStream类似。 在Reader类中的 方法处理的是字符 abstract int read() throws IOException int read(char b[]) throws IOException void close() throws IOException void skip() throws IOException
OutputStream类 abstract void write(int b)throws IOException void write(byte [b)throws IOException void close()throws IOException void flush()throws IOException ©2006计算机系杨厚群 All rights lefts reserved
©2006 计算机系 杨厚群 All rights & lefts reserved. OutputStream类 abstract void write(int b) throws IOException void write(byte[] b) throws IOException void close() throws IOException void flush() throws IOException
Writera类 abstract void write(int b)throws IOException void write(char [b)throws IOException void close()throws IOException void flushO throws IOException ©2006计算机系杨厚群 All rights lefts reserved
©2006 计算机系 杨厚群 All rights & lefts reserved. Writer类 abstract void write(int b) throws IOException void write(char[] b) throws IOException void close() throws IOException void flush() throws IOException
外文件处理 必须使用文件流来读写磁盘文件。使用 FileInputStream或File0 utputStream处理 字节流,FileReader或FileWriter:处理字符 流 ©2006计算机系杨厚群 All rights lefts reserved
©2006 计算机系 杨厚群 All rights & lefts reserved. 外部文件处理 必须使用文件流来读写磁盘文件。使用 FileInputStream 或 FileOutputStream 处理 字节流, FileReader 或 FileWriter处理字符 流