~ubuntu-branches/ubuntu/quantal/commons-io/quantal

« back to all changes in this revision

Viewing changes to src/java/org/apache/commons/io/output/NullWriter.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2008-02-21 13:26:43 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080221132643-p4c8f8lhb9rnqnlo
Tags: 1.4-1
* New upstream release
* Bump Standards-Version to 3.7.3
* Bump up debhelper compat to 6
* Replace XS-Vcs headers with Vcs
* debian/patches:
  - remove 01_no_ext_links.dpatch - not required
  - remove 02_no_mkdir_in_homedir.dpatch - not required
* Remove dpatch from Build-Depends
* Update debian/rules and debian/libcommons-io-java-doc.install
  with new target dirs
* debian/copyright: add copyright notice

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 * This <code>Writer</code> has no destination (file/socket etc.) and all
25
25
 * characters written to it are ignored and lost.
26
26
 * 
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 $
28
28
 */
29
29
public class NullWriter extends Writer {
 
30
    
 
31
    /**
 
32
     * A singleton.
 
33
     */
 
34
    public static final NullWriter NULL_WRITER = new NullWriter();
30
35
 
31
36
    /**
32
37
     * Constructs a new NullWriter.
34
39
    public NullWriter() {
35
40
    }
36
41
 
37
 
    /** @see java.io.Writer#write(int) */
 
42
    /**
 
43
     * Does nothing - output to <code>/dev/null</code>.
 
44
     * @param idx The character to write
 
45
     */
38
46
    public void write(int idx) {
39
47
        //to /dev/null
40
48
    }
41
49
 
42
 
    /** @see java.io.Writer#write(char[]) */
 
50
    /**
 
51
     * Does nothing - output to <code>/dev/null</code>.
 
52
     * @param chr The characters to write
 
53
     */
43
54
    public void write(char[] chr) {
44
55
        //to /dev/null
45
56
    }
46
57
 
47
 
    /** @see java.io.Writer#write(char[], int, int) */
 
58
    /**
 
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
 
63
     */
48
64
    public void write(char[] chr, int st, int end) {
49
65
        //to /dev/null
50
66
    }
51
67
 
52
 
    /** @see java.io.Writer#write(String) */
 
68
    /**
 
69
     * Does nothing - output to <code>/dev/null</code>.
 
70
     * @param str The string to write
 
71
     */
53
72
    public void write(String str) {
54
73
        //to /dev/null
55
74
    }
56
75
 
57
 
    /** @see java.io.Writer#write(String, int, int) */
 
76
    /**
 
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
 
81
     */
58
82
    public void write(String str, int st, int end) {
59
83
        //to /dev/null
60
84
    }