A Input and output
1. Stream represents any data source capable of producing data, or any receiving source capable of receiving data. In Java io, all the stream (including input and out stream) includes two types:
1.1 Byte-oriented stream
A byte-oriented stream that represents the reading or writing of information from a stream to a stream in bytes. The byte-oriented stream includes the following types:
1 input stream:
1) Bytearrayinputstream: Use a buffer in memory as a InputStream
2) StringBufferInputStream: Put a String object as a InputStream
3) FileInputStream: A file as a inputstream, to achieve the read operation of the file
4) PipedInputStream: Realize the concept of pipe, mainly used in the thread
5) Sequenceinputstream: Combine multiple inputstream into one InputStream
2) out stream
1) Bytearrayoutputstream: Storing information in a buffer in memory
2) FileOutputStream: Deposit The information in the file
3) PipedOutputStream: Realize the concept of pipe, mainly used in the thread
4) Sequenceoutputstream: Combine multiple outstream into one OutStream
1.2 Stream with Unicode characters as the guide
A Unicode-oriented stream that writes information from a stream to read from or to a stream in a Unicode character. The Unicode character-oriented stream includes the following types:
1 Input Stream
1) CharArrayReader: corresponding to the Bytearrayinputstream
2) StringReader: corresponding to the StringBufferInputStream
3) FileReader: corresponding to the FileInputStream
4) Pipedreader: corresponding to the PipedInputStream
2) Out Stream
1) Chararraywrite: corresponding to the Bytearrayoutputstream
2) Stringwrite: No corresponding byte-oriented stream
3) FileWrite: corresponding to the FileOutputStream
4) Pipedwrite: corresponding to the PipedOutputStream
The character-oriented stream basically has a byte-oriented stream corresponding to it. Two corresponding classes implement the same functionality, the word is in the operation of the different direction. such as CharArrayReader: and Bytearrayinputstream function is to use a buffer in memory as a inputstream, the difference is that the former each time from memory to read a byte of information, the latter each time from memory read a character.