All About Class SequenceInputStream in Java

0
122
Spread the love
  • 29
  • 34
  • 28
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    138
    Shares

Class SequenceInputStream in Java
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.

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 29
  • 34
  • 28
  • 35
  •  
  •  
  •  
  • 12
  •  
  •  
    138
    Shares

LEAVE A REPLY

Please enter your comment!
Please enter your name here