1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.util.servlet;
1819import javax.servlet.ServletOutputStream;
20import java.io.OutputStream;
21import java.io.IOException;
2223/*** This class is a ServletOutputStream wrapper around an existing24 * OutputStream so that this OutputStream may be used within a 25 * ServletResponse implementation.26 *27 * @author <a href="raphael@apache.org">Raphaël Luta</a>28 * @version $Id: EcsServletOutputStream.java,v 1.3 2004/02/23 03:19:26 jford Exp $29 */30publicclassEcsServletOutputStreamextends ServletOutputStream {
3132/*** The real OutputStream to use */33private OutputStream out = null;
3435/*** This constructor creates a new OutputStream and associates36 * it with an existing OutputStream.37 *38 * @param out the OutputStream to use for writing data39 */40protectedEcsServletOutputStream(OutputStream out) {
41this.out = out;
42 }
4344/*** Writes an integer to the data stream.45 * This call is delegated to the wrapped OutputStream.46 * All the inherited methods from ServletOutputStream will use47 * this method to output data48 *49 * @param c the integer to write to the stream50 */51publicvoid write(int c) throws IOException {
52this.out.write(c);
53 }
54 }