brooklyn.util.stream.IllegalOutputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brooklyn-utils-common Show documentation
Show all versions of brooklyn-utils-common Show documentation
Utility classes and methods developed for Brooklyn but not dependendent on Brooklyn or much else
package brooklyn.util.stream;
import java.io.OutputStream;
/** output stream which throws if anyone tries to write to it */
public class IllegalOutputStream extends OutputStream {
@Override public void write(int b) {
throw new IllegalStateException("should not write to this output stream");
}
@Override public void write(byte[] b, int off, int len) {
throw new IllegalStateException("should not write to this output stream");
}
}