Java-FileReader

FileReader FileReader class provides the functionality of reading character from a file. In the following program, an object is created for the FileReader class by passing the data file output.txt as the argument for its constructor. Since the alphabets have been written into this data file in the previous program, they are retrieved, one by … Read more…

Java-Reader and Writer Classes

Reader and Writer Classes The Reader and Writer classes and their subclasses are used for dealing with data in text format. While the Writer class contains methods that are identical to those available in OutputStream class, the Reader class contains methods that are identical to those available in InputStream class. The only difference is that the methods … Read more…

Java-InputStream and OutputStream Classes

InputStream and OutputStream Classes The InputStream and OutputStream classes and their subclasses are used for dealing with data in binary format. The important methods in these two classes are described in following tables : Important Methods in the OutputStream Class Methods Usage write( ) To write a byte to the outputstream write(byte b[ ]) To … Read more…