Enumeration of java.io.InputStream in bytes.

Refactored and generalized the existing enumReader function to
produce a similar enumInputStream function.
Merge pull request #366