import java.io.*;

public class Log2AreaStream  extends FilterOutputStream 
{
	OpenFile file;
	LogHandler parent;

	public void setFile(OpenFile file,LogHandler parent) {
		this.file=file;
		this.parent=parent;
	}

	
	public Log2AreaStream(OutputStream LStream) {
		super(LStream);
	}
	

	public void write(byte b[]) throws IOException {
		String s=new String(b);
		file.appendText(s);
		parent.LogFileChanged(file);
	}

	public void write(byte b[], int off, int len) throws IOException {
		String s=new String(b, off, len);
		file.appendText(s);
		parent.LogFileChanged(file);
	}
}

