CHAPTER 82 — Input and Output Streams

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to home page   go to next page        

created: 06/02/00; revised: 07/08/02, 06/08/03, 07/23/06

CHAPTER 82 — Input and Output Streams

This chapter discusses input and output (IO) using the package java.io. IO is done using streams. A stream is a sequence of data flowing from a source to a destination. IO streams can be connected to a wide variety of data sources and destinations.

Chapter Topics:

  • IO Streams
  • Readers and Writers
  • InputStreams and OutputStreams
  • Character data and UTF
  • Processing Streams

You have already used streams in reading data from the keyboard and in writing data to the monitor. Streams are used for much more than that.

QUESTION 1:

Java can read data from the Internet. What does this data look like to a Java program?