01: package gnu.text;
02:
03: /** A reader for an empty stream (similar to /dev/null). */
04:
05: public class NullReader extends java.io.Reader {
06: public static final NullReader nullReader = new NullReader();
07:
08: public int read(char[] buffer, int offset, int length) {
09: return -1;
10: }
11:
12: public boolean ready() {
13: return true;
14: }
15:
16: public void close() {
17: }
18: }
|