Home > Back-end >  Characters of the flow is how to read the text on the hard disk, translate the Java char types, stri
Characters of the flow is how to read the text on the hard disk, translate the Java char types, stri

Time:11-25

Java character in the stream is what principle, why use character read utf-8 text, use the read () returns the unicode int, middle is how convert?

CodePudding user response:

Go to the source code

CodePudding user response:

Reads the inputstream is according to the char

CodePudding user response:

refer to the original poster drop drop drop response:
Java character in the stream is what principle, why use character read utf-8 text, use the read () returns the unicode int, middle is how convert?


Read characters of the flow without parameters is equal to the byte stream

CodePudding user response:

InputStream is binary stream,
Binary flow character flow switch, is done by InputStreamReader,
Specific conversion process, want to see the Java source code,

To understand the source code, to study the characters of codec technology, understand the commonly used several kinds of character encoding, (exclusive of GBK Chinese characters, for example, GB2312, etc., universal utf-8, Unicode, etc., and ISO - 8859-1 in Western Europe, etc., and the most simple ACSII code) and the corresponding coding rules and character codes,

Know that the encoding rules, the conversion process is obvious,
  • Related