In Java programming, to perform the input-output in file handling Java has a java.io package which contain contains nearly every class you might ever need.
In java programming, a sequence of data defined as a “stream”.
Simply there are two type of streams:
- InputStream − To read data from a source InputStream is used.
- OutputStream- To write a data to a destination OutputStream is used.
In java, package “java.io” contains a large number of stream classes and these classes can be divided into two groups:
- Byte stream
- Character stream