Is there a clean and simple way to convert an instance of java.io.PrintWriter
into a java.io.PrintStream
?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
First obtain an
OutputStream
from theWriter
. See this questionThen pass it as argument to the
PrintStream
constructor:Update: commons-io 2.0 has
WriterOutputStream
, so use it.