How does BufferedOutputStream actually work at a low level?
问题 I understand the theory behind BufferedOutputStream . Bytes are written to a buffer array until it is full, and then written (flushed) to the underlying stream - the idea being that it is faster than writing byte-by-byte as there are fewer OS calls. However, from looking at the implementation of the BufferedOutputStream class and methods (BufferedOutputStream.java), it seems that ultimately, the bytes from the buffer are just written byte-by-byte. I think this is the case because: In