Home : Course Map : Chapter 9 : Java :
Other IO Topics
JavaTech
Course Map
Chapter 9

Introduction
Overview
Streams
Wrappers,Buffers
Console I/O
  Text Output 
     Demo 1

  Formatter/printf()
     Demo 2

  Tex 2t Input
     Demo 3

  Scanner
     
Demo 4
File Class
  File I/O
  File Output-Text
     Demo 5

  Formatter to File
     Demo 6

  File Input - Text
    Demo 7

  Scanner - Files
     Demo 8

  File I/O - Binary
     Demo 9
   Demo 10
File Chooser Dialog
  Demo 11

Character Codes
  Demo 12
   Demo13
Object I/O
Types to Bytes
Stream Filters
Other I/O Topics
Exercises

    Supplements
Character I/O
  Demo 1   Demo 2
Random Access
  Demo 3
ZIP/GZIP Streams
  Demo 4
Piped Streams
  Demo 5
NIO Framework
More NIO
  Demo 6

     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

Java I/O is a big issue and we will come back to it often. There are several other classes and packates that we didn't have time to discuss here. Some of these include:

The Chapter 9: Tech section uses histograms to illustrate several of the I/O techniques discussed in this chapter. The topics include:

 

Java Stream Tables

It can inially be confusing to find the correct type of I/O classes to use for a particular kind of data. You can check the tables here to find the starting class for your I/O task and ways to wrap the class to add buffering, filtering, and other useful methods:

Input Stream Examples
Source Stream Wrappings
Console BufferedReader (new InputStreamReader (System.in))
Text in a byte stream BufferedReader (new InputStreamReader (InputStream))
Text file BufferedReader (new FileReader (new File ("f.txt"))
Binary Data File DataInputStream (new FileInputStream (new File ("f.bin"))

 

Output Stream Examples
Destination Stream Wrappings
Console PrintWriter (new OutputStreamWriter (System.out))
Text in a byte stream PrintWriter (new BufferedWriter (new OutputStreamWriter (OutputStream)))
TextFile PrintWriter (new BufferedWriter ( new FileWriter (
new File ("f.txt")))
Binary Data File DataOutputStream (new FileOutputStream (new File ("f.bin"))

 

 

 

Latest update: Nov. 14, 2004

              Tech
Histogram I/O
Hist I/O - Get/Set
  Demo 1
Hist I/O - Objects
  Demo 2
HistogramStream
  Demo 3
Filtering Data
  Demo 4
Exercises

           Physics
Physics Model
Simulation Design
Physics Simulator
  Demo 1
Experiment Design
Experiment Sim.
  Demo 2
Analysis
Expt. + Analysis
  Demo 3
Exercises

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.