1 16 package org.apache.commons.io.output; 17 18 import java.io.IOException ; 19 import java.io.FilterOutputStream ; 20 import java.io.OutputStream ; 21 22 29 public class ProxyOutputStream extends FilterOutputStream { 30 31 private OutputStream proxy; 32 33 37 public ProxyOutputStream(OutputStream proxy) { 38 super(proxy); 39 this.proxy = proxy; 40 } 41 42 43 public void write(int idx) throws IOException { 44 this.proxy.write(idx); 45 } 46 47 48 public void write(byte[] bts) throws IOException { 49 this.proxy.write(bts); 50 } 51 52 53 public void write(byte[] bts, int st, int end) throws IOException { 54 this.proxy.write(bts, st, end); 55 } 56 57 58 public void flush() throws IOException { 59 this.proxy.flush(); 60 } 61 62 63 public void close() throws IOException { 64 this.proxy.close(); 65 } 66 67 } 68 | Popular Tags |