Most applications need to process some input and produce some output based on that input.
The purpose of the Java IO package (java.io
) is to make that possible in Java.
澶у鏁扮殑搴旂敤寰寰闇瑕佽闂竴浜涜緭鍏ワ紝騫朵笖鏍規嵁杈撳叆鏉ヤ駭鐢熺浉搴旂殑杈撳嚭銆侸ava IO鍖呬嬌榪欎竴鍒囧湪java涓彉寰楀彲鑳姐?/span>
If you look at the Java IO classes in the java.io
package the vast amount
of choices can be rather confusing. What is the purpose of all these classes? Which one
should you choose for a given task? How do you create your own classes to plugin? etc.
The purpose of this tutorial is to try to give you an overview of how all these classes
are grouped, and the purpose behind them, so you don't have to wonder whether you chose
the right class, or whether a class already exists for your purpose.
The java.io
package doesn't actually address all types of input and output.
For instance, input from and output to a GUI or web page is not covered in the Java IO package.
Those types of input are covered elsewhere, for instance by the JFC classes in the Swing project,
or the Servlet and HTTP packages in the Java Enterprise Edition.
The Java IO package is primarily focused on input and output to files, network streams, internal memory buffers etc.
浜嬪疄涓婏紝java.io鍖呭茍涓嶈兘瑙e喅鎵鏈夌被鍨嬬殑杈撳叆銆佽緭鍑恒傛瘮濡傝錛屽熀浜嶨UI鍜寃eb欏甸潰鐨勮緭鍏ャ佽緭鍑哄氨涓嶅湪java.io鍖呯殑澶勭悊鑼冨洿鍐呫傝繖浜涚被鍨嬬殑杈撳叆銆佽緭鍑哄湪鍏朵粬鏂歸潰姣斿Swing閲岄潰鐨凧FC綾伙紝Servlet錛宩ava浼佷笟鐗堥噷闈㈢殑HTTP鍖呰瑙e喅銆?br /> Java IO鍖呬富瑕佸叧娉ㄦ枃浠剁殑杈撳叆銆佽緭鍑猴紝緗戠粶嫻佷互鍙婂唴瀛樼紦鍐茬瓑銆?/span>
Below is a table of contents of the topics and classes covered in this tutorial. The coverage
of the classes is not just an API listing. You can get that from Sun's official Java Doc's.
Rather each text is a short introduction to the class, its purpose, and a few examples
of how to use it. In other words, some of the stuff you don't find in Sun's official Java Doc's.
涓嬮潰鐨勮〃鏍煎垪鍑轟簡鏈暀紼嬩腑娑電洊鐨勫唴瀹規爣棰樺拰綾伙紝榪欎笉浠呬粎鏄竴涓狝PI鐨刲ist銆?br />