本文介绍了Java中是否有Null OutputStream?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要为我正在使用的API指定 OutputStream
,但我实际上并不需要输出。 Java是否有 OutputStream
相当于> / dev / null
?
I need to specify an OutputStream
for an API I'm using, but I don't actually have a need for the output. Does Java have an OutputStream
equivalent to > /dev/null
?
推荐答案
Java看起来不像Apache Commons IO那样。看看以下内容:
Java doesn't it would seem but Apache Commons IO does. Take a look at the following:
希望有所帮助。
这篇关于Java中是否有Null OutputStream?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!