PushBackReader Demo

This post explains PushBackReader class in java. This reader allows us to put the data read from the input stream back into the stream and reread it again. The below explains how to use it Main Class package IO; import java.io.PushbackReader; import java.io.StringReader; public class PushBackReaderDemo { public static void main(String[] args) throws Exception {… Continue reading PushBackReader Demo

How to use SequenceInputStream

SequenceInputStream reads data from multiple inputstreams in an order. It starts with first inputstream and once it is done reading the first inputstream, it starts reading data from the next available inputstream. Two constructors are available for creating an instance of this stream. First one being SequenceInputStream(InputStream s1, InputStream s2) The above constructors limits us… Continue reading How to use SequenceInputStream