try {
while (cli.getErrorStream().available() > 0) {
System.err.print((char) cli.getErrorStream().read());
}
String s;
while ((s = cli.readLine()) != null) {
System.out.println(s);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();