When you develop any java application then you will get the requirement to interact with various input/output devices. Input-Output devices are the part of underlying hardware and operating system. To interact with the Input-Output devices through java program/application some implementations had to be used to improve the maintenance of applications when someone changes device or OS.
To resolve this, java vendor provided API in java.io package in which each class represents one source or device.
Java I/O stream is the flow of data that you can either read from, or you can write to. It is used to perform read and write operations in file permanently. Java uses streams to perform these tasks. Java I/O stream is also called File Handling, or File I/O. It is available in java.io package.