1 24 package org.riotfamily.common.web.util; 25 26 import java.io.IOException ; 27 import java.io.OutputStream ; 28 29 import javax.servlet.ServletOutputStream ; 30 31 37 public class DelegatingServletOutputStream extends ServletOutputStream { 38 39 private final OutputStream targetStream; 40 41 45 public DelegatingServletOutputStream(OutputStream targetStream) { 46 this.targetStream = targetStream; 47 } 48 49 public void write(int b) throws IOException { 50 this.targetStream.write(b); 51 } 52 53 public void flush() throws IOException { 54 super.flush(); 55 this.targetStream.flush(); 56 } 57 58 public void close() throws IOException { 59 super.close(); 60 this.targetStream.close(); 61 } 62 63 } 64 | Popular Tags |