Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.util.io;
 
An output stream which copies anything written into it to another stream.
 
public class TeeOutputStream
    extends OutputStream
    private OutputStream output1;
    private OutputStream output2;

    
Base constructor.

Parameters:
output1 the output stream that is wrapped.
output2 a secondary stream that anything written to output1 is also written to.
    public TeeOutputStream(OutputStream output1OutputStream output2)
    {
        this. = output1;
        this. = output2;
    }
    public void write(byte[] buf)
        throws IOException
    {
        this..write(buf);
        this..write(buf);
    }
    public void write(byte[] bufint offint len)
        throws IOException
    {
        this..write(bufofflen);
        this..write(bufofflen);
    }
    public void write(int b)
        throws IOException
    {
        this..write(b);
        this..write(b);
    }
    public void flush()
        throws IOException
    {
        this..flush();
        this..flush();
    }
    public void close()
        throws IOException
    {
        this..close();
        this..close();
    }
New to GrepCode? Check out our FAQ X