01: /* NullReader.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Wed Jan 24 11:15:08 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.io;
20:
21: /**
22: * A reader that returns nothing, aka, an empty reader.
23: *
24: * @author tomyeh
25: * @see NullWriter
26: * @see NullInputStream
27: */
28: public class NullReader extends java.io.Reader {
29: public int read(char[] cbuf, int off, int len) {
30: return -1;
31: }
32:
33: public void close() {
34: }
35: }
|