package com.hand.mas.ant.util;

import java.io.InputStream;
import java.util.Scanner;

public class ErrStreamMonitor implements Runnable{
	public InputStream errStm;
	public boolean hasErr = false;
	
	public ErrStreamMonitor(InputStream is){
		errStm = is;
	}
	public void run(){
		Scanner sc = new Scanner(errStm);
		while(sc.hasNext()){
			System.err.println(sc.next());
		}
	}
	
	public void setErrStm(InputStream is){
		errStm = is;
	}
	
	public boolean isHasErr(){
		return hasErr;
	}
}
