KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > text > NullReader


1 package gnu.text;
2
3 /** A reader for an empty stream (similar to /dev/null). */
4
5 public class NullReader extends java.io.Reader JavaDoc
6 {
7   public static final NullReader nullReader = new NullReader();
8
9   public int read (char[] buffer, int offset, int length) { return -1; }
10
11   public boolean ready () { return true; }
12
13   public void close () { }
14 }
15
Popular Tags