java.util.Scanner#findWithHorizon throws OutOfMemory exception on 32Mb input stream
<p>Search string '4914904' exists at the tail of the stream.</p>

<p>Here's the code        </p>

<pre><code>    Scanner sc = new Scanner(xmlInputStream, "UTF-8");
    if(sc.findWithinHorizon('4914904', 0) != null) { // &lt;--- exception is thrown here
    }
</code></pre>

<p>Any suggestions would be highly appreciated.</p>
