I/O Input and Output
Abstract int read () indicates reading one byte and then returning the read bytes. When the returned number is-1, the byte stream is read.
Int read (byte [] B) indicates to read data into a byte array and then return the actual number of bytes read. When the returned number is-1, the byte stream is read.
Int read (byte [] B, int off, int len) indicates the number of bytes read from a single byte array. When the returned number is-1, the byte stream is read. Off is the starting offset of the byte array. len indicates the maximum number of bytes read.
Why is the first method Abstract? Because the second method is implemented by the third method, and the third method is implemented by the first method.
Available () to obtain the number of bytes of the input stream.
Skip () is used to locate the input position pointer.
Reset (), returns the previous flag.
Mark (int a), mark bit. If the number of digits read exceeds a, continue reading.
3. outputStream
Abstract int write (int a) writes a byte to the input stream.
Int writer (byte [] B) writes a byte array to the input stream.
Int writer (byte [] B, int off, int len) writes an offset from off to the input stream and ends when the number is len.