Fix bug in InputStreamUtil.
- toIterator accidentally called .size() which caused it to read in the stream instead of using the parameter named size.