1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.util.servlet;
18
19 import javax.servlet.ServletOutputStream;
20 import java.io.OutputStream;
21 import java.io.IOException;
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 {
31
32 /*** The real OutputStream to use */
33 private OutputStream 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 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 {
52 this.out.write(c);
53 }
54 }