禁用System.err [英] Disable System.err
本文介绍了禁用System.err的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法设置流System.err所以写入的所有内容都被忽略了? (即丢弃未输出)
Is there a way to set the stream System.err so everything written to it is ignored? (i.e. discarded not outputted)
推荐答案
System.setErr(new PrintStream(new OutputStream() {
public void write(int b) {
}
}));
这篇关于禁用System.err的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文