handle sync stream.read() calls