Standard input and output streams
Standard input stream: system.in, the default point is the keyboard
Standard output stream: System.out, the default point is the console
Change the default direction of the input and output stream
static void SetIn (InputStream in)
Reassign the "standard" input stream.
static void SetOut (PrintStream out)
Reassign the "standard" output stream.
Convert stream
OutputStreamWriter, character Stream, is a bridge of characters flowing to the stream of words
InputStreamReader, character Stream, is the bridge of byte flow to character stream
Print Flow
PrintStream: Byte stream, no auto refresh function
Print ()
println ()
Write ()
PrintWriter: Character stream, with auto refresh function
Print () + +
println ()
Write ()
Wrap Line
println ()
Auto Refresh
Automatic refresh must be on, and only valid for the three methods of println, printf, or format
Object Manipulation Flow
Function: For reading and writing objects
ObjectOutputStream: Writes an object to a file, serializes
* WriteObject (Object o)
ObjectInputStream: Reads the files in the object, deserializes them
* ReadObject ()
Properties
Hashtable and HashMap, StringBuffer and StringBuilder, vectors and ArrayList
Java Learning-Basic knowledge Advanced Day-notes