Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.ant.internal.ui.launchConfigurations;
Stream monitor implementation for an Ant build process.
public class AntStreamMonitor implements IFlushableStreamMonitor {
	private StringBuffer fContents = new StringBuffer();
	private ListenerList fListeners = new ListenerList(1);
	private boolean fBuffered = true;

	public void addListener(IStreamListener listener) {

	public String getContents() {
		return .toString();

	public void removeListener(IStreamListener listener) {

Appends the given message to this stream, and notifies listeners.

	public void append(String message) {
		if (isBuffered()) {
		Object[] listeners = .getListeners();
		for (int i = 0; i < listeners.lengthi++) {
			IStreamListener listener = (IStreamListener)listeners[i];
	public void flushContents() {

	public boolean isBuffered() {
		return ;

	public void setBuffered(boolean buffer) {
		 = buffer;
New to GrepCode? Check out our FAQ X