| Java I/O provides a very powerful and adaptable set of tools. The 
              designers sought to devise a general set of classes and methods 
              that you can combine in different ways to attack different kinds 
              of I/O tasks.  For example, whether one reads from the keyboard, from a local 
              file, or from a file over the internet, the stream of data 
              will look the same to a high level read method.  However, Java I/O is complicated. Just doing something as basic 
              as writing data to a file can involve the instantiation of two or 
              three classes. That is why we avoided Java I/O, other than System.out.println(), 
              until now. (An approach of some books is to provide a set of custom 
              tools for basic I/O that are simple to use.)  This introduction to Java IO provides the following:  
              Overview of Java I/O
Stream - the essential concept in 
                Java I/O. 
Wrappers - add capabilities to a 
                stream class by wrapping it with a higher level class.
Console I/O provides useful interaction 
                with applications. 
                
                  Text outputFormatter 
                    and System.out.printf() 
                    - J2SE5.0 brings a new class and method for formatted numerical 
                    outputText inputScanner 
                    - the new class in J2SE5.0 for formatted input.
File Class - this class provides 
                an identifier for a file.
 
                  File I/O - the stream classes 
                    for reading/writing with files.
Text output to a file - writing/reading 
                    characters to filesFormatter 
                    output to a fileText input from a fileScanner 
                    input from a file
File I/O - Binary - writing/reading 
                    binary data.
Character encodingObject I/OConverting primitive types to bytes and backSources, destinations, and filtersFile Chooser Dialog - browse local 
                directories with a JFileChooser.Other I/O Topics - brief look 
                at other IO classesExercises     Latest update: Nov. 10, 2004 |