1 18 package com.Ostermiller.util; 19 20 import java.io.*; 21 22 36 public class NoCloseWriter extends Writer implements NoCloseStream { 37 38 47 protected Writer out; 48 49 54 public NoCloseWriter(Writer out){ 55 this.out = out; 56 } 57 58 61 public void write(int c) throws IOException { 62 out.write(c); 63 } 64 65 68 public void write(char[] cbuf) throws IOException { 69 out.write(cbuf); 70 } 71 72 75 public void write(char[] cbuf, int off, int len) throws IOException { 76 out.write(cbuf, off, len); 77 } 78 79 82 public void write(String str) throws IOException { 83 out.write(str); 84 } 85 86 89 public void write(String str, int off, int len) throws IOException { 90 out.write(str, off, len); 91 } 92 93 96 public void flush() throws IOException { 97 out.flush(); 98 } 99 100 107 public void close() throws IOException { 108 } 109 110 113 public void reallyClose() throws IOException { 114 out.close(); 115 } 116 } 117 | Popular Tags |