1 32 33 package com.jeantessier.dependencyfinder.cli; 34 35 import java.io.*; 36 37 public class NullPrintWriter extends PrintWriter { 38 private static final Writer NULL_WRITER = new StringWriter(); 39 40 public NullPrintWriter() { 41 super(NULL_WRITER); 42 } 43 44 public void flush() { 45 } 47 48 public void close() { 49 } 51 52 public boolean checkError() { 53 return false; 54 } 55 56 protected void setError() { 57 } 59 60 public void write(int c) { 61 } 63 64 public void write(char[] buf, int off, int len) { 65 } 67 68 public void write(char[] buf) { 69 } 71 72 public void write(String s, int off, int len) { 73 } 75 76 public void write(String s) { 77 } 79 80 public void print(boolean b) { 81 } 83 84 public void print(char c) { 85 } 87 88 public void print(int i) { 89 } 91 92 public void print(long l) { 93 } 95 96 public void print(float f) { 97 } 99 100 public void print(double d) { 101 } 103 104 public void print(char[] s) { 105 } 107 108 public void print(String s) { 109 } 111 112 public void print(Object obj) { 113 } 115 116 public void println() { 117 } 119 120 public void println(boolean x) { 121 } 123 124 public void println(char x) { 125 } 127 128 public void println(int x) { 129 } 131 132 public void println(long x) { 133 } 135 136 public void println(float x) { 137 } 139 140 public void println(double x) { 141 } 143 144 public void println(char[] x) { 145 } 147 148 public void println(String x) { 149 } 151 152 public void println(Object x) { 153 } 155 } 156 | Popular Tags |