Why does getResourceAsStream with an empty string return an empty InputStream?
<p>I just came across some peculiar behavior with getResourceAsInputStream that I was hoping someone could shed some light on.</p>

<p>Passing this method the name of a nonexistent resource returns null, like I'd expect. However, passing it an empty or space-filled string actually returns a valid InputStream with zero bytes in it. Only empty or space-filled strings seem to do this; whitespace like "\t" or "\n" will result in a null.</p>

<p>Is this intended behavior? If so, what is it's purpose?</p>

<pre><code>this.class.getResourceAsStream("no_such_resource"); // returns null
this.class.getResourceAsStream("");                 // returns an InputStream
this.class.getResourceAsStream("    ");             // returns an InputStream
this.class.getResourceAsStream("\t");               // returns null
</code></pre>
