JAVA file IO summary

There are two operating file stream: a stream of bytes, character stream

Byte stream: FileInputStream, FileInputStream

字符流:InputStreamReader,OutputStreamReader

Both methods provide a stream object has two kinds of read, read one byte (character) and a plurality of characters (bytes)

On the basis of the character stream has been more thoroughly on a layer of packaging, BufferedReader, BufferedWriter, there are two types of parameters like FileReader acceptable because FileReader inherits from InputStreamReader. BufferedReader can read a line of data.

Guess you like

Origin www.cnblogs.com/niuyg928/p/11319338.html