The Java IO Stream classification and its main usage are as follows:
IO stream
|--Byte stream
|--byte input stream
InputStream:
int read ();//read one byte at a time
int read (byte[] bys);//read a byte array of a specified size at a time
Direct sub-class:
|--fileinputstream
|--bufferedinputstream
|--byte output stream
OutputStream:
void write (int by);//write one byte at a time
void Write (byte[] bys, int index, int len);//write one part of a character array at a time
Direct sub-class
|--fileoutputstream
|--bufferedoutputstream
|--character Stream
|--character input stream
Reader:
int read ();//read one character at a time
int read (char[] chars);//read one character array at a time
Direct sub-class
|--inputstreamreader (Byte character input conversion stream, not commonly used)
|--filereader (Common)
|--bufferedreader (efficient character input stream with buffer)
String readLine ();//read one line at a time
|--character output stream
Writer
void write (int ch);//write one character at a time
void Write (char[] chars, int index, int len);//write one part of a character array at a time
Direct sub-class
|--outputstreamwriter (Byte character output conversion stream, not commonly used)
|--filewriter (Common)
|--bufferedwriter (efficient character output stream with buffer)
void NewLine ();//write a line break
void write (string line);//write a string at a time
Java IO Flow Summary