Most programs use data in one form or another, whether it is as input, output, or both.
The sources of input and output can vary between a local file, a socket on the network, a database, variables in memory, or another program. Even the type of data can vary between objects, characters, multimedia, and others. These APIs have been part of the core JDK since version 1.0, but are often overshadowed by the more well-known APIs, such as JavaBeans TM , JFC, RMI, JDBC TM , and so on. However, input and output streams are the backbone of the JDK APIs, and understanding them is not only crucial, but can also make programming with them a lot of fun. This article covers the fundamentals of Java streams by reviewing the differences between byte and character streams, peruses the various stream classes available in the java.io package, and looks at the concept of stream chaining .