Comparative advantage byte stream file
For data transmission of text files, use the file character stream, we do not consider encoding transcoding.
Compare byte stream file, a different process in which
There are character stream file append method:
- Writer append(char c)
- Writer append (charSequence csq) Note: charSequence sequence of characters, readable and writable, String content can not be defined once, "abc" is a sequence of characters.
- Writer append (charSequence csq, int start, int end) starts from the start to the end of the character sequence csq at the start.
File character stream writer has a new method:
- void writer(String str)
- void writer(String str,int off,int len)
other
When a file character stream copy non-text files, and can copy successful, but will result in file corruption.