1 / 17

第10章 输入与输出

第10章 输入与输出. 面向对象的程序设计与 JAVA 娄不夜 王利 编著 主讲:胡传福 E-mail:hucf@dgut.edu.cn. 输入输出. Java 在 java.io 包中提供有许多的 I/O 流类。 依照读写单位,可以将数据流分为字节流、字符流和高级流等。. File 类. File(String pathname) File(String parent,String child) File(File parent,String child) 举例: File f1 = new File(“c:\tmp”); 实例方法:见 P221. 字节流.

season
Download Presentation

第10章 输入与输出

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第10章 输入与输出 面向对象的程序设计与JAVA 娄不夜 王利 编著 主讲:胡传福 E-mail:hucf@dgut.edu.cn Chapter 10

  2. 输入输出 • Java在java.io包中提供有许多的I/O流类。 • 依照读写单位,可以将数据流分为字节流、字符流和高级流等。 Chapter 10

  3. File类 • File(String pathname) • File(String parent,String child) • File(File parent,String child) • 举例: • File f1 = new File(“c:\\tmp”); • 实例方法:见P221 Chapter 10

  4. 字节流 • InputStream • OutputStream Chapter 10

  5. 字节流(…) • FileInputStream • FileOutputStream Chapter 10

  6. 字节流(…) • ByteArrayInputStream • ByteArrayOutputStream Chapter 10

  7. 字节流(…) • PipedInputStream • PipedOutputStream Chapter 10

  8. 字节流(…) • BufferedInputStream • BufferedOutputStream Chapter 10

  9. 字符流 • Reader • Writer Chapter 10

  10. 字符流(…) • InputStreamReader • OutputStreamWriter Chapter 10

  11. 字符流(…) • FileReader • FileWriter Chapter 10

  12. 字符流(…) • CharArrayReader • CharArrayWriter Chapter 10

  13. 字符流(…) • StringReader • StringWriter Chapter 10

  14. 字符流(…) • PipedReader • PipedWriter Chapter 10

  15. 字符流(…) • BufferedReader • BufferedWriter Chapter 10

  16. 高级流 • DataInputStream • DataOutputStream Chapter 10

  17. 标准输入输出流 • public final class System{ • public final static InputStream in; • public final static PrintStream out; • … • } Chapter 10

More Related