1 18 package com.Ostermiller.util; 19 20 import java.io.*; 21 22 36 public class NoCloseOutputStream extends OutputStream implements NoCloseStream { 37 38 47 protected OutputStream out; 48 49 56 public NoCloseOutputStream(OutputStream out){ 57 this.out = out; 58 } 59 60 63 public void write(int b) throws IOException { 64 out.write(b); 65 } 66 67 70 public void write(byte[] b) throws IOException { 71 out.write(b); 72 } 73 74 77 public void write(byte[] b, int off, int len) throws IOException { 78 out.write(b, off, len); 79 } 80 81 84 public void flush() throws IOException { 85 out.flush(); 86 } 87 88 95 public void close() throws IOException { 96 } 97 98 101 public void reallyClose() throws IOException { 102 out.close(); 103 } 104 } 105 | Popular Tags |