Clear streams buffer

I’m using streams.serial to talk to a device. Is there a way to clear the buffer before reading it?

Edit: nevermind, I can just check for available(), read() and do nothing to flush.