All About Class SequenceInputStream in Java



The SequenceInputStream class allows an application to combine several input streams serially and make them appear as if they were a single input stream.Each input stream is read from in turn,until it reaches the end of the stream.The SequenceInputStream class then closes that stream and automatically switches to the next InputStream.

The class structure of the SequenceInputStream is given as:

public class java.io.SequenceInputStream extends java.io.InputStream{
//constructors
public SequenceInputStream(Enumeration e);
//constructs a new SequenceInputStream object. It is initialized to the specified enumeration of InputStream.
//Each object is the enumeration must be a valid Input Stream.
public SequenceInputStream(InputStream s1,InputStream s2);
//constructs a new SequenceInputStream object. It is initialized to read first from input stream s1 and then 
//from InputStream s2
//methods
public void close();
public int read();
public int read(byte b[],int offSet,int length);
}
 
In addition,all methods may throw an IOException if an IO error occurs apart from their regular Exceptions.
All About Class SequenceInputStream in Java All About Class SequenceInputStream in Java Reviewed by Animesh Chatterjee on October 11, 2018 Rating: 5

No comments:

Powered by Blogger.