1: More commonly used streams
Fileinputstream,fileoutputstream,filereader,filewriter
Bufferedreader,bufferedwriter.
Inputstreamreader,outputstreamwriter
Node flow: Directly related to a data source or destination.
Process Flow: The construction method must have a node stream.
Buffer stream: A stream with a buffer, such as a buffered word.
All replicated standards are programs.
2: Other Streams
2.1; Printstream,printwriter Print Flow
Print a byte stream, printing a stream of characters.
The difference between print () and the Write () method
For example, to print an integer, print prints 4 bytes, but write writes only the last byte.
3:properties class
MAP--->hashtable------>properties class
This class is primarily used for writing configuration files. And the keys and values inside the set are string types. (Init,)
4:randomaccessfile class Random read-write class.
Seek () position, readable and writable, and operate a regular file. The purpose of random reading is achieved.
5;datainputstream,dataoutputstream operation of basic data type data.
6: Object flow ; Objectinputstream,objectoutputstream, which is used to manipulate objects.
In the program, an object is created, but when the program terminates, the garbage collector reclaims the space. This object cannot be found. Then other programs will not be able to use this object, how to persist the object persisted. You can use object flow to write objects to a file.
7: The Memory stream (which is actually the array stream.) ByteArray chararrays
Because arrays are allocated in memory, they are also called memory streams.
This stream does not produce a IOException exception and is not closed.
The Bytearrayinputstream constructor method needs to accept an array.
Bytearrayoutputstream constructor method because it is written into memory, you do not have to write parameters. If you want to get the data written, you can call the ToString () and Tobytearray () methods.
byte stream : Fileinputstream,fileoutputstream.inputstreamreader,
Objectinputstream,bytearrayinputstream
character Stream : Filereader,filewriter,bufferedreader,bufferedwriter,printwriter, Objectoutputstream.byteoutputstream,outputstreamwriter.
file classes: Files
Streaming Device : keyboard, HDD, memory, console.
Java-io Flow Summary