@Override
    public void run() {

        int lineNr = 0;
        int lastLineNr = -1;
        String line = null;
        while (!m_stopThread) {
            lineNr = m_lineReader.getLineNumber();
            try {
                line = m_lineReader.readLine();
            } catch (IOException e) {
                // "Write end dead" IO exceptions can be ignored
            }
            if (line != null) {
                if (lineNr > lastLineNr) {
                    // supress multiple output of the same line after "Write end dead" IO exception
                    String content = (lineNr + 1) + ":\t" + line;
                    m_messages.add(content);
                    lastLineNr = lineNr;
                    if (m_logWriter != null) {
                        try {
                            m_logWriter.write(content + "\n");
                        } catch (IOException e) {
                            m_logWriter = null;
                        }
                    }
                }
            }
        }
        try {
            m_pipedIn.close();
        } catch (IOException e) {
            // ignore
        }
        if (m_logWriter != null) {
            try {
                m_logWriter.close();
            } catch (IOException e) {
                m_logWriter = null;
            }
        }
    }
@ Override public void run ( ) { int lineNr = 0 ; int lastLineNr = - 1 ; String line = null ; while ( ! m_stopThread ) { lineNr = m_lineReader . getLineNumber ( ) ; try { line = m_lineReader . readLine ( ) ; } catch ( IOException e ) { } if ( line != null ) { if ( lineNr > lastLineNr ) { String content = ( lineNr + 1 ) + ":\t" + line ; m_messages . add ( content ) ; lastLineNr = lineNr ; if ( m_logWriter != null ) { try { m_logWriter . write ( content + "\n" ) ; } catch ( IOException e ) { m_logWriter = null ; } } } } } try { m_pipedIn . close ( ) ; } catch ( IOException e ) { } if ( m_logWriter != null ) { try { m_logWriter . close ( ) ; } catch ( IOException e ) { m_logWriter = null ; } } }
@see java.lang.Runnable#run()