15.IO Streams Introduction
15.IO Streams Introduction
Introduction
• The reason behind having two separate streams for output and error is that the standard o
utput should be used for regular program outputs while standard
error should be used for error messages.
You can use this method to list all the System Properties.
You can also use System.getProperty(String Key) method to get the value of a particular
property represented with a key.
The System.setProperties(Properties prp) method sets the system properties to the Properti
es argument.
You can use this method to change the system properties as per your requirement.
Properties p = System.getProperties();
p.put("java.home", "D:\\Program Files\\java1.5\\jdk1.5.0_02");
System.setProperties(p);
InputStream OutputStream
BufferedInputStre BufferedOutputStrea
am m
FileInputStre ObjectInputStrea FileOutputStrea ObjectOutputStre
am m m am
BufferedRea BufferedWrit
der er
FileRead InputStreamRea FileWriter OutputStreamWrit
er der er
BufferedInputStream
BufferedOutputStrea To read & write data into buffer
m
FileInputStream
To read & write data into file
FIleOutputStream
ObjectInputStream
ObjectOutputStrea
To read & write object into
m secondary device (serialization
)
BufferedReader
To read & write data into buffer
BufferedWriter
FileReader
To read & write data into file
FIleWriter
InputStreamReade
r Bridge from character stream
OutputStreamWrit to byte stream
er
Column A Column B