Day22:
IO Stream Overall:
Standard input/output stream
Convert stream
InputStreamReader: Byte stream "Data Trend"
OutputStreamWriter: Character Flow byte stream
Print Flow:
PrintStream
PrintWriter
You can manipulate the file directly:
constructor method, whether to accept both file and string type arguments
FileReader FileWriter FileInputStream Fileoutoutstream printstream
PrintWriter:
Construction method
"Access Denied" exception may appear in Read folder
Print () method ~
Serialization: Input An object in the same way as a stream
ObjectInputStream--Object readobject ()
Deserialization: Restoring a Stream object to an object
ObjectOutputStream--void WriteObject (Object obj)
Serialization ID value fixed
A: The object of the class wants to be serialized stream operation, please serialize the interface;
B: Class implements the serializable interface, resolves the Yellow line warning, and the fixed ID value.
Coding issues:
Encoding table: the characters and their corresponding values are saved in a single table
Properties:
Represents a collection of properties that can be loaded from a stream or stored in a stream with a key value of string
No generics, only a collection that can be used in conjunction with IO streams
String getProperties (String key):
String GetProperties (String key,string defaultvalue):
Object setproperties (String key,string value):
Set<string> Stringpropertieyname ():
System Properties
public static Properties GetProperties (): System Property Set
Combination of collection and IO streams:
List () Method: Stores the data key value pairs in the collection in a file
Load () method: reads the data from the file into the collection "The data is the mode of the key-value pair-delimiter"
Store () method
Java Basics-Day 22nd