Utility classes for buffering and re-reading java.io.InputStream