Gosucherry:
But in my application, I have to do this MUCH faster than just reading all data.
What you have posted is how I would do it.
How long do you think that piece of code takes to complete?
How quickly (in microseconds) do you need to clear the buffer?
...R