How to convert a Reader to InputStream and a Writer to OutputStream?

前端 未结 12 2165
慢半拍i
慢半拍i 2020-12-02 07:31

Is there an easy way to avoid dealing with text encoding problems?

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 08:06

    You can't avoid text encoding issues, but Apache commons-io has

    • ReaderInputStream
    • WriterOutputStream

    Note these are the libraries referred to in Peter's answer of koders.com, just links to the library instead of source code.

提交回复
热议问题