channel buffer to byte buffer