当前位置: 代码迷 >> Java相关 >> [求助]java的输入/输出流的要点是什么?
  详细解决方案

[求助]java的输入/输出流的要点是什么?

热度:129   发布时间:2005-08-13 18:26:00.0
[求助]java的输入/输出流的要点是什么?
我是一个新手`````刚学到输入/输出流就觉得很烦````学不会```还有点想放弃``` 高手可以帮帮我吗? 请问“java的输入/输出流的要点是什么?” QQ:284312644 邮箱:www_it@163.com 两仲方式联系都行``````谢谢啦`````
搜索更多相关的解决方案: java  要点  输出  输入  

----------------解决方案--------------------------------------------------------
你这个问题提得很含糊啊,关于IO 的相关问题,我建议你结合具体问题来提,这样我才能给你明确的解答。
----------------解决方案--------------------------------------------------------
楼主的意思是想说要掌握哪几个常用API或是主要用途有哪些?
----------------解决方案--------------------------------------------------------
以下是引用牛虻在2005-8-14 1:00:20的发言: 楼主的意思是想说要掌握哪几个常用API或是主要用途有哪些?
这位朋友说得对```````IO的主要重点和难点有哪些`````????????????
----------------解决方案--------------------------------------------------------

相对于初学者,I/O中的每个类都是重点,尽管有的一些不常用,但还是要了解之,不然很难明白其真正底层的东西,java已经够面向对象了,你如果不了解它里面的一些机理,那就更加抽象了。等到你真正想用它写点东西的时候有可能会茫然,或者方法匮乏。所以建议把文档通看一下,虽然很多,但是有好处^_^。当然如果你是从业人士,如果你说那样会花很多冤枉的时间,那我无言以对。下面是摘自thinking in java的一段,希望对你在思想上有所帮助:

Creating a good input/output (I/O) system is one of the more difficult tasks for the language designer.

This is evidenced by the number of different approaches. The challenge seems to be in covering all eventualities. Not only are there different sources and sinks of I/O that you want to communicate with (files, the console, network connections, etc.), but you need to talk to them in a wide variety of ways (sequential, random-access, buffered, binary, character, by lines, by words, etc.).

The Java library designers attacked this problem by creating lots of classes. In fact, there are so many classes for Java’s I/O system that it can be intimidating at first (ironically, the Java I/O design actually prevents an explosion of classes). There was also a significant change in the I/O library after Java 1.0, when the original byte-oriented library was supplemented with char-oriented, Unicode-based I/O classes. In JDK 1.4, the nio classes (for “new I/O,” a name we’ll still be using years from now) were added for improved performance and functionality. As a result, there are a fair number of classes to learn before you understand enough of Java’s I/O picture that you can use it properly. In addition, it’s rather important to understand the evolution history of the I/O library, even if your first reaction is “don’t bother me with history, just show me how to use it!” The problem is that without the historical perspective, you will rapidly become confused with some of the classes and when you should and shouldn’t use them.

[此贴子已经被作者于2005-8-16 12:53:52编辑过]


----------------解决方案--------------------------------------------------------
  相关解决方案