1. Byte stream :
Iuputstream the superclass of all byte output streams. Abstract class
----FileInputStream
----Bufferedinputstream: Provides read efficiency of data, extended method (internally maintains an array of 8k bytes)
OutputStream the superclass of all byte output streams. Abstract class
----FileOutputStream
----Bufferedoutputstream: Improve the writing efficiency of data, expand the method (internal maintenance of a 8k byte array)
Writes to disk: 1. Flush () by flush (), 2.close (), 3. The data is already full in the array
2. Character Stream :
Reader: Super class for character input stream
----FileReader
----BufferedReader: Improve the reading efficiency of data, expand the method (internally maintained a character array, size 8,192 characters)
Write: The superclass of the character output stream
----FileWriter
1024 characters are maintained as characters
Writes to disk: 1. Flush () by flush (), 2.close (). 3. Data is already full in the array
----BufferedWriter: Improve the writing efficiency of data, expand the method (internal maintenance of a character array, size 8,192 characters)
3. Sequence Flow:
Sequenceinputstream can concatenate multiple bytes of input streams, and then stream those bytes into one read data.
4. Object input and output stream:
ObjectInputStream
Objectoutputsream
Use note points:
1. Want to read or write objects to disk through the object stream, you need to make the object's owning class implement serializable interface, serializable interface, there is no way to just make a mark
2. When changing the value of a property in a class, you can still read the data and need to set Serialversionuid to a constant: private static final long serialversionuid = 1L;
3. If you do not want to write a property to disk, you can use the transient keyword to decorate
Collecting Exception Log Information
Simple summary of JAVA IO stream + Collect log exception information