Wrap getting the hflush in a method.