/*************************************** * * * JBoss: The OpenSource J2EE WebOS * * * * Distributable under LGPL license. * * See terms of license at gnu.org. * * * ***************************************/ package org.jboss.util.stream; import java.io.OutputStream; /** * A null OutputStream. All values passed to * {@link #write(int)} are discarded. Calls to {@link #flush()} and * {@link #close()} are ignored. * *

All methods are declared NOT to throw IOExceptions. * * @version $Revision: 1.1 $ * @author Jason Dillon */ public final class NullOutputStream extends OutputStream { /** A default null output stream. */ public static final NullOutputStream STREAM = new NullOutputStream(); /** * Non-operation. */ public void write(final int b) {} /** * Non-operation. */ public void flush() {} /** * Non-operation. */ public void close() {} /** * Non-operation. */ public void write(final byte[] bytes) {} /** * Non-operation. */ public void write(final byte[] bytes, final int offset, final int length) {} }