Home | | Web Programming | The Stream Classes - java.io

Chapter: Java The Complete Reference : The Java Library : Input/Output: Exploring java.io

The Stream Classes - java.io

Java’s stream-based I/O is built upon four abstract classes: InputStream, OutputStream, Reader, and Writer.

The Stream Classes

 

Java’s stream-based I/O is built upon four abstract classes: InputStream, OutputStream, Reader, and Writer. These classes were briefly discussed in Chapter 13. They are used to create several concrete stream subclasses. Although your programs perform their I/O operations through concrete subclasses, the top-level classes define the basic functionality common to all stream classes.

 

InputStream and OutputStream are designed for byte streams. Reader and Writer are designed for character streams. The byte stream classes and the character stream classes form separate hierarchies. In general, you should use the character stream classes when working with characters or strings and use the byte stream classes when working with bytes or other binary objects.

 

In the remainder of this chapter, both the byte- and character-oriented streams are examined.


Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Java The Complete Reference : The Java Library : Input/Output: Exploring java.io : The Stream Classes - java.io |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.