Topic: 流和Reader, Writer之间的转换问题

  Print this page

1.流和Reader, Writer之间的转换问题 Copy to clipboard
Posted by: cngzsunny
Posted on: 2003-09-24 11:21

我们通常可以用InputStreamReader, OutputStreamWriter实现了InputStream向Reader, OutputStream向Writer的转换。同时这两个类提供其中一个构造函数,可以传入Encoding参数,解决了流变成字符的编码转换问题。

但是java并没有提供Reader向InputStream,或者是Writer向OutputStream的逆转换类

有兴趣的java达人,可以研究一下……

2.Re:流和Reader, Writer之间的转换问题 [Re: cngzsunny] Copy to clipboard
Posted by: Biubiu
Posted on: 2003-09-24 12:23

有这个必要吗?

3.Re:流和Reader, Writer之间的转换问题 [Re: cngzsunny] Copy to clipboard
Posted by: archonLing
Posted on: 2003-09-24 16:40

Readers & Writers are earsier to work with when you are dealing with String related input and output. Streams mostly handles inputs & outputs in byte level. I guess you would need to pick the right tools for the job.


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923