Implement ReadUpTo().