FileDocCategorySizeDatePackage
BuildLogMsgDoc.javaAPI DocGlassfish v2 API16341Fri May 04 22:32:06 BST 2007com.sun.enterprise.util

ThreadedReader

public class ThreadedReader extends Thread
The ThreadedReader is used to read stdout/stderr of the find command and return its results in an ArrayList buffer.

Fields Summary
BufferedReader
_reader
String
_messageKey
ArrayList
_result
Constructors Summary
public ThreadedReader(InputStream is, ArrayList result, String messageKey)


           
        _reader = new BufferedReader(new InputStreamReader(is));
        _result = result;
        _messageKey = messageKey;
    
Methods Summary
public voidrun()

        try {
            String line = null;
            while (true) {
			    line = _reader.readLine();
			    if (line == null) {
				    break;
			    }
                _result.add(line);
            }
        } catch (Exception ex) {
            System.err.println("ThreadedReader " + _messageKey + " exception");
            ex.printStackTrace();
        }