The family system of the 16-bit operation flow is this: Reader,writer abstract class,
Then the implementation class Filereader,filewriter, write can write the string content directly, read or the same.
Then is the base class wrapper class Bufferedreader,bufferwriter, which buffers the stream. The ReadLine can be used to read a line of lines, which can recognize line breaks. Then is the character array of the wrapper stream CharArrayReader, with the output content intercepting the stream chararraywriter,
Then is the eight-bit flow 16-bit stream operation class Inputreader, pay attention to the code, accidentally changed the code randomly garbled.
The following screenshot from Csdn's one senior's repost: Bowen Address: http://blog.csdn.net/u010737354/article/details/52456570,
With FileOutputStream as the representative, Writ wrote the int over ~128~127| | 0~255, it will be the basic data type coercion, all the way to byte eight-bit write down, the accuracy of the reference Windoss Programmer calculator calculation. No reference please leave a message, I will open a blog to talk about.
Take FileInputStream as the representative, writ's reading, is not more than 255, big is to make negative, this I also really can't push out, oh, right, pay attention to different encoding format, such as a Chinese character, read up the number of bytes may be 2, may be 3 bytes. Read reads a bit, the bits that are read are displayed in decimal, and can be converted to characters for easy viewing.
16-bit stream eight-bit streams, outputstreamwriter, base class like Filewrit, these are not capable of eight-bit and 16-bit direct conversions because of parameters. Eight-bit to 16-bit, 16-bit can read the eight-bit file path, 16 bits to eight bits, 16 bits can be written out for the eight-bit file path.
ZipFile: Used to read a file from a zip archive, the ZipEntry class is used to receive a ZIP file that zipfile reads. When the zip file is read, each file is wrapped in order to zipentry the object. The ZipFile getInputStream converts the zipentry to the output stream.