1 16 17 package org.directwebremoting.util; 18 19 import java.io.IOException ; 20 import java.io.OutputStream ; 21 22 import javax.servlet.ServletOutputStream ; 23 24 27 public class DelegatingServletOutputStream extends ServletOutputStream 28 { 29 33 public DelegatingServletOutputStream(OutputStream targetStream) 34 { 35 this.proxy = targetStream; 36 } 37 38 42 public OutputStream getTargetStream() 43 { 44 return proxy; 45 } 46 47 50 public void write(int b) throws IOException 51 { 52 proxy.write(b); 53 } 54 55 58 public void flush() throws IOException 59 { 60 super.flush(); 61 proxy.flush(); 62 } 63 64 67 public void close() throws IOException 68 { 69 super.close(); 70 proxy.close(); 71 } 72 73 private final OutputStream proxy; 74 } 75 | Popular Tags |