Java I/O Stream
Java I/O Stream
Topics
1 2
3
4 5 6 7
8
9 10 11
What is an I/O stream? Types of Streams Java.io package hierarchy Control flow of an I/O operation using Streams Byte streams Character streams Buffered streams Standard I/O streams Data streams Object streams File class
2
I/O Streams
Input Stream
A program uses an input stream to read data from a source, one item at a time
6
source:java.sun.com
Output Stream
A program uses an output stream to write data to a destination, one item at time
2.Types of Streams
8
Abstract Classes
15
InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
Syntax: public abstract class InputStream extends Object implements Closeable
Streams
InputStream
OutputStream
Reader
Writer
14