Reduced code duplication.
Added the emptyBuffer() method to the buffered reader implementation.