JAVA IO Streams Overview


JAVA IO Streams

What is an I/O STREAM?

Java I/O STREAMS represent either retrieval of data from a SOURCE or storing of data in to a DESTINATION. Here both SOURCE and DESTINATION represents any of the following Disc, Devices, Arrays and other Programs/Threads etc.


Input Stream




Output Stream

Characterization of STREAM’s
  1. Java IO Streams can be primarily characterized as BYTE Streams and CHARACTER Streams.
    • Byte Streams – Byte Streams directly read’s bytes from the Source or write’s bytes to the Destination. The super types of Byte Streams are InputStream and OutputStream.
    • Character Streams – Character Streams read’s Character from the Source or write’s Character to the Destination. Character Streams internally converts Unicode to Local Character Set (depends on the Java Locale provided). The super types of Character Streams are Reader and Writer.         
  2. Java IO Streams can also be characterized as Source Facing Streams and Stream Facing Streams.
    • Source Facing Streams – Source Facing Streams are Streams which directly either reads or writes into the source or destination. Examples of Source facing Stream are FileInputStream, FileOutputStream, ArrayInputStream and ArrayOutputStream etc.
    • Stream Facing Streams – Stream Facing Streams are Streams which depends upon intermediate input or output streams to read or write data. Example of Stream Facing Streams are BufferedInputStream, ObjectStream etc.

JAVA IO Table



<< Java IO Stream MENU Major Java IO Streams >>

No comments:

Post a Comment