All About Class FilterInputStream in Java

0
24
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

FilterInputStream in Java
FilterInputStream in Java

FilterInputStream in Java:

FilterInputStream is the super class of all classes that filter input streams.These streams sit on top of an already existing input stream(the underlying input stream) but provides additional functionalities. It is an abstract class provides an interface for useful functionalities to other InputStream classes.

It has the following classifications:

  1. DataInputStream
  2. BufferedInputStream
  3. LineNumberInputStream
  4. PushbackInputStream

The class structure of the class FilterInputStream is given below:


public class java.io.FilterInputStream extends java.io.InputStream{
//member element
protected InputStream in;
//This input stream is under consideration
//constructor
public FilterInputStream(InputStream in);
//creates an object of the FilterInputStream on top of the input stream specified.
//Methods
public int available();
public int read();
public int read(byte b[]);
public int read(byte b[],int offSet,int length);
public void close();
public void mark(int readLimit);
public boolean markSupported();
public void reset();
public long skip(long l);
}
 

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
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here