is there a blocking read function that allows me to read n bytes from a stream?