Reading bytes to buffer