/* * Created on 18.11.2003 * * (c) Stabsstelle IKT-Strategie des Bundes */ package at.gv.egovernment.moa.spss.slinterface.filters; import java.io.ByteArrayOutputStream; import java.io.IOException; /** * @author Gregor Karlinger (mailto:gregor.karlinger@cio.gv.at) */ public class ServletOutputStream extends javax.servlet.ServletOutputStream { private ByteArrayOutputStream outputStream_; /* ---------------------------------------------------------------------------------------------------- */ /** * Default constructor. */ public ServletOutputStream() { super(); outputStream_ = new ByteArrayOutputStream(); } /* ---------------------------------------------------------------------------------------------------- */ /** * @see java.io.OutputStream#write(int) */ public void write(int b) throws IOException { outputStream_.write(b); } /* ---------------------------------------------------------------------------------------------------- */ /** * Returns the content of this stream as a byte array. * * @return the content of this stream as a byte array. */ public byte[] toByteArray() { return outputStream_.toByteArray(); } }