Preface the Refresh in Java (that is, the flush () function). Refresh is to flush the buffer, buffer is memory, so it is too awkward--more simple to understand that should be, refresh means to force the memory of the data written to disk (i.e., files, various consoles, browsers, etc.).
Reference: Java what is called Refresh stream buffering
A stream is a form in a computer that is used to pass data between two devices or libraries. Open a document with a computer and display it as an example: a document is actually a collection of many characters, and the characters are ordered. When you are about to open it, the computer reads the file from the hard disk, and then a line is passed to the display device. As you can imagine, the system is constantly extracting data from the file from its starting position, as water flows through the pipe to the display device. This is the stream, which is exactly the file stream. So you think, since the flow, you need plumbing. We say that pipelines are buffers. is actually to read the data to the buffer first, and then display the device to read the data from the buffer. The concept is understood, let's say the following. The display device gets the data usually after the buffer is filled. But there are times when the data we want to pass in a single time is not as large as the buffer, so we need to refresh the cache and force the stream data in the cache to be pushed to the display device.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Refresh in Java