1 18 package com.Ostermiller.util; 19 20 import java.io.*; 21 22 36 public class NoCloseReader extends Reader implements NoCloseStream { 37 38 47 protected Reader in; 48 49 56 public NoCloseReader(Reader in){ 57 this.in = in; 58 } 59 60 63 public int read() throws IOException { 64 return in.read(); 65 } 66 67 70 public int read(char[] cbuf) throws IOException { 71 return in.read(cbuf); 72 } 73 74 77 public int read(char[] cbuf, int off, int len) throws IOException { 78 return in.read(cbuf, off, len); 79 } 80 81 84 public long skip(long n) throws IOException { 85 return in.skip(n); 86 } 87 88 91 public boolean ready() throws IOException { 92 return in.ready(); 93 } 94 95 102 public void close() throws IOException { 103 } 104 105 108 public void mark(int readlimit) throws IOException { 109 in.mark(readlimit); 110 } 111 112 115 public void reset() throws IOException { 116 in.reset(); 117 } 118 119 122 public boolean markSupported(){ 123 return in.markSupported(); 124 } 125 126 129 public void reallyClose() throws IOException { 130 in.close(); 131 } 132 } 133 | Popular Tags |