001    package org.maltparser.core.helper;
002    
003    import java.io.OutputStream;
004    import java.io.PrintStream;
005    import java.util.Locale;
006    /**
007    *
008    *
009    * @author Johan Hall
010    */
011    public final class NoPrintStream extends PrintStream {
012            public static final OutputStream NO_OUTPUTSTREAM = NoOutputStream.DEVNULL;
013        public static final PrintStream NO_PRINTSTREAM = new NoPrintStream();
014        private NoPrintStream() {
015            super(NO_OUTPUTSTREAM);
016            }
017            @Override
018            public PrintStream append(char c) {
019                    return super.append(c);
020            }
021    
022            @Override
023            public PrintStream append(CharSequence csq, int start, int end) {
024                    return super.append(csq, start, end);
025            }
026    
027            @Override
028            public PrintStream append(CharSequence csq) {
029                    return super.append(csq);
030            }
031    
032            @Override
033            public boolean checkError() {
034                    return super.checkError();
035            }
036    
037            @Override
038            public void close() {
039                    super.close();
040            }
041    
042            @Override
043            public void flush() {
044                    super.flush();
045            }
046    
047            @Override
048            public PrintStream format(Locale l, String format, Object... args) {
049                    return super.format(l, format, args);
050            }
051    
052            @Override
053            public PrintStream format(String format, Object... args) {
054                    return super.format(format, args);
055            }
056    
057            @Override
058            public void print(boolean b) {}
059    
060            @Override
061            public void print(char c) {}
062    
063            @Override
064            public void print(char[] s) {}
065    
066            @Override
067            public void print(double d) {}
068    
069            @Override
070            public void print(float f) {}
071    
072            @Override
073            public void print(int i) {}
074    
075            @Override
076            public void print(long l) {}
077    
078            @Override
079            public void print(Object obj) {}
080    
081            @Override
082            public void print(String s) {}
083    
084            @Override
085            public PrintStream printf(Locale l, String format, Object... args) {
086                    return super.printf(l, format, args);
087            }
088    
089            @Override
090            public PrintStream printf(String format, Object... args) {
091                    return super.printf(format, args);
092            }
093    
094            @Override
095            public void println() {}
096    
097            @Override
098            public void println(boolean x) {}
099    
100            @Override
101            public void println(char x) {}
102    
103            @Override
104            public void println(char[] x) {}
105    
106            @Override
107            public void println(double x) {}
108    
109            @Override
110            public void println(float x) {}
111    
112            @Override
113            public void println(int x) {}
114    
115            @Override
116            public void println(long x) {}
117    
118            @Override
119            public void println(Object x) {}
120    
121            @Override
122            public void println(String x) {}
123    
124            @Override
125            protected void setError() {
126                    super.setError();
127            }
128    
129            @Override
130            public void write(byte[] buf, int off, int len) {}
131    
132            @Override
133            public void write(int b) {}
134    }
135