Wednesday, 18 September 2013

getInputStream() is not returning readable information

getInputStream() is not returning readable information

My homework assignment is to call a .jar from within a java program but I
can't get the input stream to return the results into something readable.
Here is what I did first:
InputStream in = proc.getInputStream();
System.out.println(in);
But that didn't work, and I found some different variation:
BufferedReader input = new BufferedReader(new
InputStreamReader(p.getInputStream()));
System.out.println(input);
But that didn't work either, both scenarios it returned something like
this: java.io.BufferedReader@2ce908. How can I get it to return a readable
output?

No comments:

Post a Comment