This is a quick reference of constructors for various Stream classes.
You can quickly find out what all type of resources or streams a Stream class can be attached with. For instance, a BufferedReader do not have a constructor that can accept an InputStream, however an InputStreamReader has such a constructor that can accept an InputStream. So to use an InputStream such as System.in, we can attach it to an InputStreamReader and then attach the InputStreamReader to a BufferedReader as:
A stream can be considered as a sequence of bytes travelling from a source to a destination.
All input and output data transfer in Java happens through streams.
There can be different types of sources and destinations such as disk files, input devices like keyboards and even other programs, and there are different stream classes available corresponding to each of these types of sources and destinations.
This is a personal technical blog where we share our understanding on various concepts and is neither an official page or documentation for the products described here, nor the official views of the companies we work with.
Keywords used in this website are trademarks of their respective owners. This website is not affiliated with Oracle™ and/or any of the JEE frameworks like Spring™, Struts™, Hibernate™ and JSF™.
All contents and materials are provided freely without any warranty or liability and nothing within the site should be considered as professional advice. In any doubt, please ask, and we will try to help you based on our knowledge. Please let us know if you feel anything is not right here (including any copyright violation) and we will act upon it as fast as we can.