Index: main/trunk/gli/src/org/greenstone/gatherer/gui/FormatConversionDialog.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/gui/FormatConversionDialog.java	(revision 29030)
+++ main/trunk/gli/src/org/greenstone/gatherer/gui/FormatConversionDialog.java	(revision 29031)
@@ -1,2 +1,27 @@
+/**
+ *#########################################################################
+ *
+ * A component of the Gatherer application, part of the Greenstone digital
+ * library suite from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * Copyright (C) 1999 New Zealand Digital Library Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *########################################################################
+ */
+
 package org.greenstone.gatherer.gui;
 
@@ -4,5 +29,4 @@
 import org.greenstone.gatherer.Dictionary;
 import org.greenstone.gatherer.Gatherer;
-//import static org.greenstone.gatherer.cdm.Format4gs3Manager.NumberedJTextArea;
 import org.greenstone.gatherer.cdm.CollectionConfigXMLReadWrite;
 import org.greenstone.gatherer.util.Codec;
@@ -10,21 +34,11 @@
 import org.greenstone.gatherer.util.OutputStreamGobbler;
 import org.greenstone.gatherer.util.StaticStrings;
-import org.greenstone.gatherer.util.Utility;
 import org.greenstone.gatherer.util.XMLTools;
 
-import org.fife.ui.rsyntaxtextarea.*;
 import org.w3c.dom.*;
 
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.Closeable;
 import java.io.File;
-import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-//import java.awt.Dimension;
+
 import java.awt.*;
 import java.awt.event.*;
@@ -33,5 +47,4 @@
 import javax.swing.border.*;
 import javax.swing.event.*;
-import javax.swing.undo.*;
 
 
@@ -39,8 +52,8 @@
 // + StreamGobblers: http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html
 // Need to test on Windows: the Ctrl-D/Ctrl-Z sent to formatconverter.exe. May not need to do anything special for Windows now that this code is using StreamGobblers to process the in/out streams of the process
-// Need to use dictionary for labels
-// convertFormat() for remote GS
+// + Need to use dictionary for labels
+// X convertFormat() for remote GS. Remote does not display Format Conversion wizard
 // + HTML tidy (put all "<br/>" back to "<br>" in luce/etc/collectionConfig.xml and run again)
-// Help tooltips on buttons
+// + Help tooltips on buttons
 // + Undo, Redo buttons
 // X Split class into dialog/widgets and data processing?
@@ -80,10 +93,7 @@
     private GLIButton next_button = null;
     private GLIButton accept_all_button = null;
-    private GLIButton gs2_undo_button = null;
-    private GLIButton gs2_redo_button = null;
-    private GLIButton gs3_undo_button = null;
-    private GLIButton gs3_redo_button = null;
     private GLIButton htmltidy_button = null;
     private GLIButton xmltidy_button = null;
+    // the 2 NumberedJTextAreas. Each provide their own undo and redo buttons already hooked up to listeners
     private NumberedJTextArea gs2_textarea = null;
     private NumberedJTextArea gs3_textarea = null;
@@ -104,7 +114,8 @@
 	setDefaultCloseOperation(DISPOSE_ON_CLOSE);
 	
-
-	gs2_textarea = new NumberedJTextArea();
-	gs3_textarea = new NumberedJTextArea();
+	// The NumberedJTextArea provides its own undo and redo buttons, already hooked up to listeners
+	// Just need to place these buttons in the dialog
+	gs2_textarea = new NumberedJTextArea("gs2", Dictionary.get("FormatConversionDialog.GS2_Text_Tooltip"));
+	gs3_textarea = new NumberedJTextArea("gs3", Dictionary.get("FormatConversionDialog.GS3_Text_Tooltip"));
 
 
@@ -112,17 +123,8 @@
 	midbutton_panel.setComponentOrientation(Dictionary.getOrientation());
 
-	gs2_undo_button = new GLIButton(Dictionary.get("General.Undo"), Dictionary.get("General.Undo_Tooltip"));
-	gs2_undo_button.setEnabled(false);
-
-	gs2_redo_button = new GLIButton(Dictionary.get("General.Redo"), Dictionary.get("General.Redo_Tooltip"));
-	gs2_redo_button.setEnabled(false);
-
-	gs2_undo_button.addActionListener(new UndoListener(gs2_textarea, gs2_undo_button, gs2_redo_button));
-	gs2_redo_button.addActionListener(new RedoListener(gs2_textarea, gs2_undo_button, gs2_redo_button));
-
 	JButton reconvert_button = new GLIButton(Dictionary.get("FormatConversionDialog.Reconvert"), Dictionary.get("FormatConversionDialog.Reconvert_Tooltip"));
 
-	midbutton_panel.add(gs2_undo_button);
-	midbutton_panel.add(gs2_redo_button);
+	midbutton_panel.add(gs2_textarea.undoButton);
+	midbutton_panel.add(gs2_textarea.redoButton);
 	midbutton_panel.add(reconvert_button);
 	reconvert_button.addActionListener(new ReconvertListener());
@@ -135,19 +137,10 @@
 	JPanel button1_panel = new JPanel();
 	button1_panel.setComponentOrientation(Dictionary.getOrientation());
-	gs3_undo_button = new GLIButton(Dictionary.get("General.Undo"), Dictionary.get("General.Undo_Tooltip"));
-	gs3_undo_button.setEnabled(false);
-
-	gs3_redo_button = new GLIButton(Dictionary.get("General.Redo"), Dictionary.get("General.Redo_Tooltip"));
-	gs3_redo_button.setEnabled(false);
-
-	gs3_undo_button.addActionListener(new UndoListener(gs3_textarea, gs3_undo_button, gs3_redo_button));
-	gs3_redo_button.addActionListener(new RedoListener(gs3_textarea, gs3_undo_button, gs3_redo_button));
-	
 
 	xmltidy_button = new GLIButton(Dictionary.get("FormatConversionDialog.XHTML_Tidy"), Dictionary.get("FormatConversionDialog.XHTML_Tidy_Tooltip"));
 	xmltidy_button.addActionListener(new XMLTidyButtonListener());
 
-	button1_panel.add(gs3_undo_button);
-	button1_panel.add(gs3_redo_button);
+	button1_panel.add(gs3_textarea.undoButton);
+	button1_panel.add(gs3_textarea.redoButton);
 	button1_panel.add(xmltidy_button);
 
@@ -167,16 +160,4 @@
 
 
-	// The undoable text areas. Adding the UndoableEditListener has to come after instantiation
-	// of the undo and redo buttons, since the listener expects these buttons to already exist
-
-	gs2_textarea.getDocument().addUndoableEditListener(new CustomUndoableEditListener(gs2_undo_button, gs2_redo_button));
-	gs3_textarea.getDocument().addUndoableEditListener(new CustomUndoableEditListener(gs3_undo_button, gs3_redo_button));
-
-	initTextArea(gs2_textarea);
-	initTextArea(gs3_textarea);
-	gs2_textarea.setToolTipText(Dictionary.get("FormatConversionDialog.GS2_Text_Tooltip"));
-	gs3_textarea.setToolTipText(Dictionary.get("FormatConversionDialog.GS3_Text_Tooltip"));
-
-
 	JPanel centre_panel = new JPanel();
 	centre_panel.setLayout(new BoxLayout(centre_panel, BoxLayout.Y_AXIS));
@@ -221,22 +202,4 @@
     }
 
-
-    public static void initTextArea(NumberedJTextArea editor_textarea) {
-	/* Fields specific to RSyntaxQuery inherited class */
-	editor_textarea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
-	editor_textarea.setBracketMatchingEnabled(true);
-	editor_textarea.setAnimateBracketMatching(true);
-	editor_textarea.setAntiAliasingEnabled(true);
-	editor_textarea.setAutoIndentEnabled(true);
-	editor_textarea.setPaintMarkOccurrencesBorder(false);
-	
-	/* Standard fields to JTextArea */
-	editor_textarea.setOpaque(false);
-	editor_textarea.setBackground(Configuration.getColor("coloring.editable_background", false));
-	editor_textarea.setCaretPosition(0);
-	editor_textarea.setLineWrap(true);
-	editor_textarea.setRows(11);
-	editor_textarea.setWrapStyleWord(false);	
-    }
 
     public int getDialogResult() {
@@ -654,9 +617,5 @@
 
 	// as we're on a new screen of dialog, need to clear all undo/redo history
-	gs2_undo_button.setEnabled(false);
-	gs2_redo_button.setEnabled(false);
-	gs3_undo_button.setEnabled(false);
-	gs3_redo_button.setEnabled(false);
-	gs2_textarea.discardAllEdits();
+	gs2_textarea.discardAllEdits(); // will disable redo/undo buttons
 	gs3_textarea.discardAllEdits();
 
@@ -750,58 +709,4 @@
 
     //******************INNER CLASSES including LISTENERS and STREAMGOBBLERS****************//
-
-    /**
-     * A textarea with the line number next to each line of the text
-     */
-    public class NumberedJTextArea extends RSyntaxTextArea /* JTextArea */
-    {
-	public void paintComponent(Graphics g)
-	{
-	    Insets insets = getInsets();
-	    Rectangle rectangle = g.getClipBounds();
-	    g.setColor(Color.white);
-	    g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
-	    
-	    super.paintComponent(g);
-	    
-	    if (rectangle.x < insets.left)
-		{
-		    FontMetrics font_metrics = g.getFontMetrics();
-		    int font_height = font_metrics.getHeight();
-		    int y = font_metrics.getAscent() + insets.top;
-		    int line_number_start_point = ((rectangle.y + insets.top) / font_height) + 1;
-		    if (y < rectangle.y)
-			{
-			    y = line_number_start_point * font_height - (font_height - font_metrics.getAscent());
-			}
-		    int y_axis_end_point = y + rectangle.height + font_height;
-		    int x_axis_start_point = insets.left;
-		    x_axis_start_point -= getFontMetrics(getFont()).stringWidth(Math.max(getRows(), getLineCount() + 1) + " ");
-		    if (!this.getText().trim().equals(""))
-			{
-			    g.setColor(Color.DARK_GRAY);
-			}
-		    else
-			{
-			    g.setColor(Color.white);
-			}
-		    int length = ("" + Math.max(getRows(), getLineCount() + 1)).length();
-		    while (y < y_axis_end_point)
-			{
-			    g.drawString(line_number_start_point + "  ", x_axis_start_point, y);
-			    y += font_height;
-			    line_number_start_point++;
-			}
-		}
-	}
-	
-	
-	public Insets getInsets()
-	{
-	    Insets insets = super.getInsets(new Insets(0, 0, 0, 0));
-	    insets.left += getFontMetrics(getFont()).stringWidth(Math.max(getRows(), getLineCount() + 1) + " ");
-	    return insets;
-	}
-    }
 
     // windowClosing() is called when the user presses the top-right close button the dialog
@@ -951,85 +856,3 @@
     }
 
-    private class UndoListener implements ActionListener
-    {	
-	NumberedJTextArea textarea = null;
-	GLIButton undobutton, redobutton;
-
-	public UndoListener(NumberedJTextArea textarea, GLIButton undobutton, GLIButton redobutton) {
-	    
-	    this.textarea = textarea;
-	    this.undobutton = undobutton;
-	    this.redobutton = redobutton;		
-	    
-	}
-	
-	public void actionPerformed(ActionEvent event)
-	{
-	    try	{
-		if (textarea.canUndo()) {						
-		    redobutton.setEnabled(true);
-		    textarea.undoLastAction();					
-		}
-		
-		if (!textarea.canUndo()) {
-		    undobutton.setEnabled(false);
-		} else {
-		    undobutton.setEnabled(true);
-		}
-		
-	    } catch (Exception e) {
-		System.err.println("Exception trying to undo: " + e.getMessage());
-		e.printStackTrace();
-	    }
-	}
-    }
-    
-    private class RedoListener implements ActionListener
-    {
-	NumberedJTextArea textarea = null;
-	GLIButton undobutton, redobutton;
-
-	public RedoListener(NumberedJTextArea textarea, GLIButton undobutton, GLIButton redobutton) {
-
-	    this.textarea = textarea;
-	    this.undobutton = undobutton;
-	    this.redobutton = redobutton;
-	}
-
-	public void actionPerformed(ActionEvent evt)
-	{
-	    try	{
-		if (textarea.canRedo()) {
-		    undobutton.setEnabled(true); // the difference with Format4gs3Manager, and no DocumentListener
-		    textarea.redoLastAction();
-		}
-		
-		if (!textarea.canRedo()) {
-		    redobutton.setEnabled(false);
-		} else {
-		    redobutton.setEnabled(true);
-		}
-		
-	    } catch (Exception e) {
-		System.err.println("Exception trying to redo: " + e.getMessage());
-		e.printStackTrace();
-	    }
-	}
-    }
-
-    private class CustomUndoableEditListener implements UndoableEditListener {
-	GLIButton undobutton = null;
-	GLIButton redobutton = null;
-
-	public CustomUndoableEditListener(GLIButton undo_button, GLIButton redo_button) {
-	    undobutton = undo_button;
-	    redobutton = redo_button;
-	}
-
-	public void undoableEditHappened(UndoableEditEvent evt)
-	{	    
-	    undobutton.setEnabled(true);
-	    redobutton.setEnabled(false);	    
-	}
-    }
 }
Index: main/trunk/gli/src/org/greenstone/gatherer/gui/NumberedJTextArea.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/gui/NumberedJTextArea.java	(revision 29031)
+++ main/trunk/gli/src/org/greenstone/gatherer/gui/NumberedJTextArea.java	(revision 29031)
@@ -0,0 +1,237 @@
+/**
+ *#########################################################################
+ *
+ * A component of the Gatherer application, part of the Greenstone digital
+ * library suite from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * Copyright (C) 1999 New Zealand Digital Library Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *########################################################################
+ */
+
+package org.greenstone.gatherer.gui;
+
+import org.greenstone.gatherer.Configuration;
+import org.greenstone.gatherer.Dictionary;
+
+import org.fife.ui.rsyntaxtextarea.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.undo.*;
+
+/**
+ * A textarea with the line number next to each line of the text.
+ * It provides undo and redo buttons that are already hooked up to listeners
+ * You can add these buttons to a JComponent and they will behave just like the 
+ * existing RSyntaxArea's Ctrl-Z and Ctrl-Y shortcuts and undo/redo popup menus.
+ */
+public class NumberedJTextArea extends RSyntaxTextArea /* JTextArea */
+    implements UndoableEditListener, ActionListener
+{
+    
+    String id = null;
+    
+    public final GLIButton undoButton;
+    public final GLIButton redoButton;
+
+    public NumberedJTextArea(String tooltip) {
+	this("", tooltip);
+    }
+    
+    public NumberedJTextArea (String id, String tooltip) {
+	super();
+	
+	this.id = id;
+	
+	// maybe use this textarea's id field to customise the undo/redo button tooltips?
+	undoButton = new GLIButton(Dictionary.get("General.Undo"), Dictionary.get("General.Undo_Tooltip"));
+	undoButton.setEnabled(false);
+	
+	redoButton = new GLIButton(Dictionary.get("General.Redo"), Dictionary.get("General.Redo_Tooltip"));
+	redoButton.setEnabled(false);
+	
+	undoButton.addActionListener(this);
+	redoButton.addActionListener(this);
+	
+	// next, initialise this RSyntaxTextArea:
+	
+	// Adding the UndoableEditListener has to come after instantiation of the undo and 
+	// redo buttons, since the listener expects these buttons to already exist
+	this.getDocument().addUndoableEditListener(this);
+	
+	/* Fields specific to RSyntaxQuery inherited class */
+	setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
+	setBracketMatchingEnabled(true);
+	setAnimateBracketMatching(true);
+	setAntiAliasingEnabled(true);
+	setAutoIndentEnabled(true);
+	setPaintMarkOccurrencesBorder(false);
+	
+	/* Standard fields to JTextArea */
+	setOpaque(false);
+	setBackground(Configuration.getColor("coloring.editable_background", false));
+	setCaretPosition(0);
+	setLineWrap(true);
+	setRows(11);
+	setWrapStyleWord(false);	
+	setToolTipText(Dictionary.get("FormatConversionDialog.GS2_Text_Tooltip"));
+    }
+    
+    public void paintComponent(Graphics g)
+    {
+	Insets insets = getInsets();
+	Rectangle rectangle = g.getClipBounds();
+	g.setColor(Color.white);
+	g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
+	
+	super.paintComponent(g);
+	
+	if (rectangle.x < insets.left)
+	    {
+		FontMetrics font_metrics = g.getFontMetrics();
+		int font_height = font_metrics.getHeight();
+		int y = font_metrics.getAscent() + insets.top;
+		int line_number_start_point = ((rectangle.y + insets.top) / font_height) + 1;
+		if (y < rectangle.y)
+		    {
+			y = line_number_start_point * font_height - (font_height - font_metrics.getAscent());
+		    }
+		int y_axis_end_point = y + rectangle.height + font_height;
+		int x_axis_start_point = insets.left;
+		x_axis_start_point -= getFontMetrics(getFont()).stringWidth(Math.max(getRows(), getLineCount() + 1) + " ");
+		if (!this.getText().trim().equals(""))
+		    {
+			g.setColor(Color.DARK_GRAY);
+		    }
+		else
+		    {
+			g.setColor(Color.white);
+		    }
+		int length = ("" + Math.max(getRows(), getLineCount() + 1)).length();
+		while (y < y_axis_end_point)
+		    {
+			g.drawString(line_number_start_point + "  ", x_axis_start_point, y);
+			y += font_height;
+			line_number_start_point++;
+		    }
+	    }
+    }
+    
+    
+    public Insets getInsets()
+    {
+	Insets insets = super.getInsets(new Insets(0, 0, 0, 0));
+	insets.left += getFontMetrics(getFont()).stringWidth(Math.max(getRows(), getLineCount() + 1) + " ");
+	return insets;
+    }
+    
+    
+    // Overriding, to ensure that even if ctrl-z was pressed to undo something,
+    // the undo and redo buttons are in sync with that.
+    public void undoLastAction() {
+	super.undoLastAction();
+	redoButton.setEnabled(true);
+	
+	if (!this.canUndo()) {
+	    undoButton.setEnabled(false);
+	} else {
+	    undoButton.setEnabled(true);
+	}
+    }
+    
+    // Overriding
+    public void redoLastAction() {
+	super.redoLastAction();
+	undoButton.setEnabled(true);
+	    
+	if (!this.canRedo()) {
+	    redoButton.setEnabled(false);
+	} else {
+	    redoButton.setEnabled(true);
+	}
+    }
+
+    // Overriding
+    public void discardAllEdits() {
+	// Buttons have to be disabled before discardAllEdits(). If done in reverse order, buttons get re-enabled
+	undoButton.setEnabled(false);
+	redoButton.setEnabled(false);
+	super.discardAllEdits();
+    }
+
+    // The RSyntaxTextarea class already provides undo and redo functionality hooked up to their
+    // usual keyboard shortcuts and to rightclick popup menus. The actionListener below merely
+    // reuses this behaviour and attaches it to the undoButton and redoButton.
+    public void actionPerformed(ActionEvent event)
+    {
+	// actionPerformed() not defined in any of the superclasses RTextArea, RTextAreaBase, JTextArea
+	//super.actionPerformed(event); // compile error
+	
+	if(event.getSource() == undoButton) {
+	    
+	    try {
+		// calls canUndo() and undoLastAction() defined by RTextArea
+		// internally calls its undoManager's canUndo() and undo() to handle compoundEdits
+		if (this.canUndo()) {
+		    this.undoLastAction();					
+		}
+		
+		if (!this.canUndo()) {
+		    undoButton.setEnabled(false);
+		} else {
+		    undoButton.setEnabled(true);
+		}
+		
+	    } catch (Exception e) {
+		System.err.println("Exception trying to undo: " + e.getMessage());
+		e.printStackTrace();
+	    }
+	}
+	else if (event.getSource() == redoButton) {
+	    try {
+		// calls canRedo() and redoLastAction() defined by RTextArea
+		// internally calls its undoManager's canRedo() and redo() to handle compoundEdits
+		
+		if (this.canRedo()) {
+		    this.redoLastAction();
+		}
+		
+		if (!this.canRedo()) {
+		    redoButton.setEnabled(false);
+		} else {
+		    redoButton.setEnabled(true);
+		}
+		
+	    } catch (Exception e) {
+		System.err.println("Exception trying to redo: " + e.getMessage());
+		e.printStackTrace();
+	    }
+	}
+    }
+
+    
+    // defined in interface UndoableEditListener
+    public void undoableEditHappened(UndoableEditEvent evt)
+    {	    
+	undoButton.setEnabled(true);
+	redoButton.setEnabled(false);	    
+    }
+}
Index: main/trunk/gli/src/org/greenstone/gatherer/util/InputStreamGobbler.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/util/InputStreamGobbler.java	(revision 29030)
+++ main/trunk/gli/src/org/greenstone/gatherer/util/InputStreamGobbler.java	(revision 29031)
@@ -1,2 +1,27 @@
+/**
+ *#########################################################################
+ *
+ * A component of the Gatherer application, part of the Greenstone digital
+ * library suite from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * Copyright (C) 1999 New Zealand Digital Library Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *########################################################################
+ */
+
 package org.greenstone.gatherer.util;
 
@@ -11,5 +36,6 @@
 
 // http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html?page=2
-// This class is used in FormatConversionDialog to properly read from the output and error streams of a Process
+// This class is used in FormatConversionDialog to properly read from the stdout and stderr
+// streams of a Process, Process.getInputStream() and Process.getErrorSream()
 public class InputStreamGobbler extends Thread
 {
Index: main/trunk/gli/src/org/greenstone/gatherer/util/OutputStreamGobbler.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/util/OutputStreamGobbler.java	(revision 29030)
+++ main/trunk/gli/src/org/greenstone/gatherer/util/OutputStreamGobbler.java	(revision 29031)
@@ -1,2 +1,27 @@
+/**
+ *#########################################################################
+ *
+ * A component of the Gatherer application, part of the Greenstone digital
+ * library suite from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * Copyright (C) 1999 New Zealand Digital Library Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *########################################################################
+ */
+
 package org.greenstone.gatherer.util;
 
@@ -12,4 +37,5 @@
 // http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html?page=2
 // This class is used in FormatConversionDialog to properly write to the inputstream of a Process
+// Process.getOutputStream()
 public class OutputStreamGobbler extends Thread
 {
