return the read bytes when EOF is reached