24
24
* This <code>Writer</code> has no destination (file/socket etc.) and all
25
25
* characters written to it are ignored and lost.
27
* @version $Id: NullWriter.java 462832 2006-10-11 15:48:09Z scolebourne $
27
* @version $Id: NullWriter.java 610010 2008-01-08 14:50:59Z niallp $
29
29
public class NullWriter extends Writer {
34
public static final NullWriter NULL_WRITER = new NullWriter();
32
37
* Constructs a new NullWriter.
34
39
public NullWriter() {
37
/** @see java.io.Writer#write(int) */
43
* Does nothing - output to <code>/dev/null</code>.
44
* @param idx The character to write
38
46
public void write(int idx) {
42
/** @see java.io.Writer#write(char[]) */
51
* Does nothing - output to <code>/dev/null</code>.
52
* @param chr The characters to write
43
54
public void write(char[] chr) {
47
/** @see java.io.Writer#write(char[], int, int) */
59
* Does nothing - output to <code>/dev/null</code>.
60
* @param chr The characters to write
61
* @param st The start offset
62
* @param end The number of characters to write
48
64
public void write(char[] chr, int st, int end) {
52
/** @see java.io.Writer#write(String) */
69
* Does nothing - output to <code>/dev/null</code>.
70
* @param str The string to write
53
72
public void write(String str) {
57
/** @see java.io.Writer#write(String, int, int) */
77
* Does nothing - output to <code>/dev/null</code>.
78
* @param str The string to write
79
* @param st The start offset
80
* @param end The number of characters to write
58
82
public void write(String str, int st, int end) {