public void run() {
        BufferedReader br = null;
        try {
            InputStreamReader isr = new InputStreamReader(this.inputStream);
            br = new BufferedReader(isr);
            
            String temp = null;
            
            synchronized (this) {
                while ((temp = br.readLine()) != null) {
                    setLine(temp + System.getProperty("line.separator"));
                    try {
                        this.wait(0);
                    } catch (InterruptedException e) {
                        System.out.println("StreamGrabber thread interrupted");
                    }
                }
            }
            
            setLine("[Process Terminated!]");
            br.close();
        } catch (IOException ioe) {
            if (br != null)
                try {
                    br.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            ioe.printStackTrace();
        } finally {
            if (br != null)
                try {
                    br.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
        }
    }