put input stream on heap