@@ -0,0 +1,1006 @@
+package org.bouncycastle.cms;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0A%0Aclass TeeInputStream%0A    extends InputStream%0A%7B%0A    private InputStream input;%0A    private OutputStream output;%0A%0A    TeeInputStream(InputStream input, OutputStream output)%0A    %7B%0A        this.input = input;%0A        this.output = output;%0A    %7D%0A%0A    public int read(byte%5B%5D buf)%0A        throws IOException%0A    %7B%0A        return read(buf, 0, buf.length);%0A    %7D%0A%0A    public int read(byte%5B%5D buf, int off, int len)%0A        throws IOException%0A    %7B%0A        int i = input.read(buf, off, len);%0A%0A        if (i %3E 0)%0A        %7B%0A            output.write(buf, off, i);%0A        %7D%0A%0A        return i;%0A    %7D%0A%0A    public int read()%0A        throws IOException%0A    %7B%0A        int i = input.read();%0A%0A        if (i %3E= 0)%0A        %7B%0A            output.write(i);%0A        %7D%0A%0A        return i;%0A    %7D%0A%0A    public void close()%0A        throws IOException%0A    %7B%0A        this.input.close();%0A        this.output.close();%0A    %7D%0A%7D%0A

Add new class TeeInputStream