I think this is detecting whether or not the read can be fulfilled from the buffer. But I am not sure.