Movatterモバイル変換


[0]ホーム

URL:


Documentation

The Java™ Tutorials
Basic I/O
I/O Streams
Byte Streams
Character Streams
Buffered Streams
Scanning and Formatting
Scanning
Formatting
I/O from the Command Line
Data Streams
Object Streams
File I/O (Featuring NIO.2)
What Is a Path? (And Other File System Facts)
The Path Class
Path Operations
File Operations
Checking a File or Directory
Deleting a File or Directory
Copying a File or Directory
Moving a File or Directory
Managing Metadata (File and File Store Attributes)
Reading, Writing, and Creating Files
Random Access Files
Creating and Reading Directories
Links, Symbolic or Otherwise
Walking the File Tree
Finding Files
Watching a Directory for Changes
Other Useful Methods
Legacy File I/O Code
Summary
Questions and Exercises
Trail: Essential Java Classes
Home Page >Essential Java Classes
« Previous • Trail • Next »

The Java Tutorials have been written for 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.
SeeDev.java for updated tutorials taking advantage of the latest releases.
SeeJava Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
SeeJDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.

Lesson: Basic I/O

This lesson covers the Java platform classes used for basic I/O. It first focuses onI/O Streams, a powerful concept that greatly simplifies I/O operations. 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.

Most of the classes covered in theI/O Streams section are in thejava.io package. Most of the classes covered in theFile I/O section are in thejava.nio.file package.

I/O Streams

File I/O (Featuring NIO.2)

Summary

A summary of the key points covered in this trail.

Questions and Exercises

Test what you've learned in this trail by trying these questions and exercises.

The I/O Classes in Action

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.


Security consideration: Some I/O operations are subject to approval by the current security manager. The example programs contained in these lessons are standalone applications, which by default have no security manager. To work in an applet, most of these examples would have to be modified. SeeWhat Applets Can and Cannot Do for information about the security restrictions placed on applets.
« PreviousTrailNext »

About Oracle |Contact Us |Legal Notices |Terms of Use |Your Privacy Rights

Copyright © 1995, 2024 Oracle and/or its affiliates. All rights reserved.

Previous page: Previous Lesson
Next page: I/O Streams

[8]ページ先頭

©2009-2025 Movatter.jp