All About Class FilterOutputStream in Java

0
28
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share


FilterOutputStream  is the super class of all classes that filter output streams.These streams sit on top of an already existing output stream(the underlying output stream) but provides additional functionalities.
The class FilterOutputStream itself overrides all methods of OutputStream with versions that pass all requests to the underlying OutputStream.Subclasses of FilterOutputStream may further override some of these methods as well as provide additional methods and fields.
The structure of the class FilterOutputStream is given as:


public class java.io.FilterOutputStream extends java.io.OutputStream{
//member element
protected OutputStream out;
//The outputStream out is under consideration.
//constructor
public FilterOutputStream(OutputStream out);
//creates an output stream filter over the specified OutputStream
//methods
public void close();
public void flush();
public void write(byte b[]);
public void write(byte b[],int offSet,int length);
public void write(int b);
}

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