Results 1 to 2 of 2

Thread: for why we use FilterOutputStream in java

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Answers
    28

    for why we use FilterOutputStream in java

    for why we use FilterOutputStream in java , pls explain wt a simple programme
    and some material get knowledege abt that
    thanks in advance


  2. #2
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: for why we use FilterOutputStream in java

    The FilterOutputStream class is the superclass of all of the output stream classes that filter output. Each of the subclasses of FilterOutputStream works by wrapping an existing output stream, called the underlying output stream, and providing additional functionality. The methods of FilterOutputStream simply override the methods of OutputStream with versions that call the corresponding methods of the underlying stream.

    FilterOutputStream cannot be instantiated directly; it must be subclassed. An instance of one of the subclasses of FilterOutputStream is constructed with another OutputStream object. The methods of a subclass of FilterOutputStream should override some methods in order to extend their behavior or provide some sort of filtering.
    public class java.io.FilterOutputStream extends java.io.OutputStream {
    // Variables
    protected OutputStream out;
    // Constructors
    public FilterOutputStream(OutputStream out);
    // Instance Methods
    public void close();
    public void flush();
    public void write(int b);
    public void write(byte[] b);
    public void write(byte[] b, int off, int len);
    }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact