The Java Tutorials have been written for JDK 8.Java教程是为JDK 8编写的。Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.本页中描述的示例和实践没有利用后续版本中引入的改进,并且可能使用不再可用的技术。See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.有关Java SE 9及其后续版本中更新的语言特性的摘要,请参阅Java语言更改。
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.有关所有JDK版本的新功能、增强功能以及已删除或不推荐的选项的信息,请参阅JDK发行说明。
This lesson covers the Java platform classes used for basic I/O.本课程介绍用于基本I/O的Java平台类。It first focuses on I/O Streams, a powerful concept that greatly simplifies I/O operations.它首先关注I/O流,这是一个强大的概念,可以极大地简化I/O操作。The lesson also looks at serialization, which lets a program write whole objects out to streams and read them back again.本课程还将介绍序列化,它允许程序将整个对象写入流,然后重新读取。Then the lesson looks at file I/O and file system operations, including random access files.然后,本课程将介绍文件I/O和文件系统操作,包括随机访问文件。
Most of the classes covered in the I/O Streams
section are in the java.io
package.I/O Streams
部分中涉及的大多数类都在java.io
包中。Most of the classes covered in the File I/O
section are in the java.nio.file
package.File I/O
部分中涉及的大多数类都在java.nio.File
包中。
String
values.String
值的二进制I/O。java.nio.file
package.java.nio.file
包的基石类。Path
class that deal with syntactic operations.Path
类中处理语法操作的方法。Path
functionality if you have older code using the java.io.File
class.java.io.File
类的旧代码,如何利用Path
功能。java.io.File
API to java.nio.file
API is provided.java.io.File
API映射到java.nio.file
API的表。A summary of the key points covered in this trail.本课程中涵盖的关键点的小结。
Test what you've learned in this trail by trying these questions and exercises.通过尝试以下问题和练习,测试您在这一过程中学到的知识。
Many of the examples in the next trail, Custom Networking use the I/O streams described in this lesson to read from and write to network connections.在下一部分中的许多示例中,自定义网络使用本课程中描述的I/O流来读取和写入网络连接。