Question about .available()

pYro_65:

How can I clear the buffer?

The same way you clear the data you want, by reading.

while( Serial.available() ) Serial.Read();

But shouldn't serial.flush() clear it? if not, then what is it for?