Fails to read InputStream
<p>I'm using the following code to read <code>InputStream</code> from <code>Runtime.Exec()</code>.</p>

<p><strong>CODE :</strong></p>

<pre><code>private String inputstreamReader(String[] shellinput) {
        InputStream inputstream = null;
        String isrval = null;
        System.out.println("Entering inputstreamReader");
        try {
            inputstream = Runtime.getRuntime().exec(shellinput)
                    .getInputStream();

            System.out.println("Tried getRuntime().exec  :: "+inputstream.read());
        } catch (IOException e) {
            System.out.println("Failed getRuntime().exec");
            e.printStackTrace();
        }
        InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
        try {
            isrval = new BufferedReader(inputstreamreader).readLine();
        } catch (IOException e1) {
            e1.printStackTrace();
        }
        System.out.println("TEMPfile is "+isrval);
        return isrval;

    }
</code></pre>

<p>But it returns :</p>

<p><strong>STACKTRACE :</strong></p>

<pre><code>02-28 19:34:20.663: I/System.out(20892): Entering inputstreamReader
02-28 19:34:20.694: I/System.out(20892): Tried getRuntime().exec  :: -1
02-28 19:34:20.694: I/System.out(20892): TEMPfile is null
</code></pre>

<p>Any idea why this happens?</p>
