1 16 17 package org.directwebremoting.util; 18 19 import java.io.IOException ; 20 import java.io.InputStream ; 21 22 import javax.servlet.ServletInputStream ; 23 24 28 public class DelegatingServletInputStream extends ServletInputStream 29 { 30 34 public DelegatingServletInputStream(InputStream proxy) 35 { 36 this.proxy = proxy; 37 } 38 39 43 public InputStream getTargetStream() 44 { 45 return proxy; 46 } 47 48 51 public InputStream getSourceStream() 52 { 53 return proxy; 54 } 55 56 59 public int read() throws IOException 60 { 61 return proxy.read(); 62 } 63 64 67 public void close() throws IOException 68 { 69 super.close(); 70 proxy.close(); 71 } 72 73 private final InputStream proxy; 74 } 75 | Popular Tags |