Files
jenkins/core/src/main/java/hudson/CloseProofOutputStream.java
T
kohsuke 9b1cd8628d I noticed that FilterOutputStream is really not implemented for a simple delegation. Look at how its write method is implemented:
public void write(byte b[], int off, int len) throws IOException {
        if ((off | len | (b.length - (len + off)) | (off + len)) < 0)
            throw new IndexOutOfBoundsException();
        for (int i = 0 ; i < len ; i++) {
            write(b[off + i]);
        }
    }


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2793 71c3de6d-444a-0410-be80-ed276b4c234a
2007-03-30 05:41:32 +00:00

19 lines
373 B
Java

package hudson;
import hudson.util.DelegatingOutputStream;
import java.io.OutputStream;
/**
* {@link OutputStream} that blocks {@link #close()} method.
* @author Kohsuke Kawaguchi
*/
public class CloseProofOutputStream extends DelegatingOutputStream {
public CloseProofOutputStream(OutputStream out) {
super(out);
}
public void close() {
}
}