package org.cytoscape.task.internal.export;

import java.io.IOException;
import java.io.OutputStream;

public class DelegatingOutputStream extends OutputStream {
	
	private OutputStream delegate = nullOutputStream();

	public void setDelegate(OutputStream o) {
		this.delegate = o == null ? nullOutputStream() : o;
	}
	
	@Override
	public void write(int b) throws IOException {
		delegate.write(b);
	}
	
	@Override
	public void flush() throws IOException {
		delegate.flush();
	}

	@Override
	public void close() throws IOException {
		delegate.close();
	}
}

@@ -400,32 +400,234 @@
 %09%7D%0A%09%0A%09@Override%0A
+%09public void write(byte%5B%5D b) throws IOException %7B%0A%09%09delegate.write(b);%0A%09%7D%0A%09%0A%09@Override%0A%09public void write(byte%5B%5D b, int off, int len) throws IOException %7B%0A%09%09delegate.write(b, off, len);%0A%09%7D%0A%09%0A%09@Override%0A
 %09public void flu

Fix performance issue when exporting