Io by flow points
Input stream, output stream
Io by type (is the type of bar)
Byte stream, character stream
-------------------------------------
Let's start with the confusion about when to use the input stream and when to use the output stream. The first input stream as the name implies is the input to what, here to stand in the program angle, input into the program, take (. txt) file content to print to the console, here is the .txt--> program, with the InputStream. Output is also relative to the program, need to write information to (. txt), is from the program-->.txt, with the outputstream.
Public abstract class InputStream extends Object implements Closeable
InputStream this abstract class is a superclass of all classes that represent byte input streams, which are primarily used to read bytes, have read (), and so on. The corresponding is OutputStream, there is write () and other methods.
Public abstract class Reader extends Object implements readable, closeable
Reader and writer Here are also a pair, and Inputstream/outputstream counterpart, reader and writer is to deal with the character stream. Garbled is starting from here! Because the characters have different encoding, there is UTF-8 storage, with GBK way read out garbled.
The most I want to do after learning Io is to read the files stored on the computer into the program to use, save data to local. With this knowledge you can make a MO system!
After nth study Javaio