Category Java

Reader Class in Java

Reader in Java is an abstract class that reads characters from the files. In simple words, the reader class reads character streams. It is the superclass of all reader subclasses. The concrete class that extends Reader class operates on Unicode…

File in Java | File Class, Example

So far, we have used variables and arrays to store data inside Java programs. This approach creates two problems. Data stored in a program is lost when the program is terminated. It means storage is temporary. Large volumes of data…

RandomAccessFile in Java

RandomAccessFile class in Java

RandomAccessFile in Java is a class that allows data to be read from and written to at any location in the file. In other simple words, RandomAccessFile class allows creating files that can be used for reading and writing data…

PushbackInputStream in Java

PushbackInputStream in Java is an input stream that pushes (i.e. returns) a single byte or character back into the input stream to reread. In other words, PushbackInputStream is a buffer stream that adds “push back” functionality to an input stream…