Answer the question
In order to leave comments, you need to log in
What does buffered mean?
For example, Java has a BufferedReader or BufferedImage class. C++ has the cout.flush() function, which, as the documentation says, "flushes the buffer". What does it mean?
Answer the question
In order to leave comments, you need to log in
FOR I/O: It reads information in large chunks and stores those chunks in memory.
It serves to speed up access, if at the very highest level the file needs to be read one byte or character at a time, and at the very lowest level (for example, a hard disk), it is more efficient to do this in 4K blocks.
For readers, flush (if there is one; BufferedReader, for example, does not have it) is used for real-time streams: keyboard, communication ports, and so on. Everything that has accumulated in the buffer is discarded, and it is considered that at the moment T the stream is empty.
Writers, of course, do not write data immediately, but when the buffer is full, and a program crash or a power outage will destroy this data. For them, the flush command physically writes the accumulated data.
FOR PICTURES: The picture is not stored in a "hardware-efficient" form, but in such a way that the user can relatively easily change it.
C++ has the cout.flush() function, which, as the documentation says, "flushes the buffer". What does it mean?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question