KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > util > servlet > EcsServletOutputStream


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 at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * 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 and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.util.servlet;
18
19 import javax.servlet.ServletOutputStream JavaDoc;
20 import java.io.OutputStream JavaDoc;
21 import java.io.IOException JavaDoc;
22
23 /** This class is a ServletOutputStream wrapper around an existing
24  * 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  */

30 public class EcsServletOutputStream extends ServletOutputStream JavaDoc {
31
32     /** The real OutputStream to use */
33     private OutputStream JavaDoc out = null;
34
35     /** This constructor creates a new OutputStream and associates
36      * it with an existing OutputStream.
37      *
38      * @param out the OutputStream to use for writing data
39      */

40     protected EcsServletOutputStream(OutputStream JavaDoc out) {
41         this.out = out;
42     }
43
44     /** Writes an integer to the data stream.
45      * This call is delegated to the wrapped OutputStream.
46      * All the inherited methods from ServletOutputStream will use
47      * this method to output data
48      *
49      * @param c the integer to write to the stream
50      */

51     public void write(int c) throws IOException JavaDoc {
52         this.out.write(c);
53     }
54 }
55
Popular Tags