- According to the data flow: the input and output streams
Inputs and outputs are from the perspective of the program is.
Input stream: data flow program
Output stream: data flows from the program.
- By the processing unit: byte stream and character stream
Byte stream: one is read into or read 8-bit binary
Character stream: once read in or out is a 16-bit binary
JDK is a suffix byte Stream stream; suffix Reader, Writer character stream
- Function Function: node flow and processing flow
Node Stream: source connected directly to the data, read or write
Process streams: one stream using the node, the node based on the stream, and then a layer of sheathing
The most fundamental of four categories: InputStream (input stream of bytes), OutputStream (output stream of bytes), Reader (character input stream), Writer (character output stream)
Extended four categories, according to the processing unit to distinguish
- InputStream:FileInputStream、PipedInputStream、ByteArrayInputStream、BufferedInputstream、SequenceInputStream、DataInputStream、ObjectInputStream
- OutputStream:FileOutputStream、PipedOutputStream、ByteArrayOutputStream、BufferedOutputStream、DataOutputStream、ObjectOutputStream、PrintStream
- Reader:FileReader、PipedReader、CharArrayReader、BufferedReader、InputStreamReader
- Writer:FileWriter、PipedWriter、CharArrayWriter、BufferedWriter、InputStreamWriter、PrintWriter
Commonly used flow
- The file operations: FileInputStream (input stream of bytes), FileOutputStream (output stream of bytes), FileReader (character input stream), FileWriter (character output stream)
- The pipeline operation: PipedInputStream (input stream of bytes), PipedOutStream (output stream of bytes), PipedReader (character input stream), PipedWriter (character output stream)
- Byte / character array: ByteArrayInputStream, ByteArrayOutputStream, CharArrayReader, CharArrayWriter
- Buffered 缓冲流:BufferedInputStream、BufferedOutputStream、BufferedReader、BufferedWriter
- Converted to byte character stream: InputStreamReader, OutputStreamWriter
- Stream: DataInputStream, DataOutputStream
- Print streams: PrintStream, PrintWriter
- Object flow: ObjectInputStream, ObjectOutputStream
- Serialization stream: SequenceInputStream
- Java self-study guide
- Java interview questions summary PC client browser [Click here]
- Java mapping knowledge
- Java applets interview questions summary view, sweep the two-dimensional code
All resources resources are summarized in the public No.