public void run() {

            byte [] buff = new byte[1024];
            try {
                while ( inputStream.read(buff) > 0 ) {
                    String t = new String(buff);

                    String [] tokens = t.split("\n");


                    for ( String s : tokens ) {


                        //else {
                            if ( isErrorStream )
                                System.out.println("ERROR-STREAM: " + s);
                            else
                                System.out.println(s);
                        //}
                    }
                    Arrays.fill(buff, (byte)0);
                }

                inputStream.close();

            } catch (Exception ex) {
                ex.printStackTrace();
            }


            if (isErrorStream)
                System.out.println("Output Stream finished.");
            else
                System.out.println("Error Stream finished.");

        }