Changeset 29016 for main/trunk


Ignore:
Timestamp:
2014-05-01T20:01:59+12:00 (10 years ago)
Author:
ak19
Message:

Cosmetic changes: 1. renamed inner StreamGobbler classes. 2. Reverting accidental commit of debugging statements in OpenCollectionDialog.java

Location:
main/trunk/gli/src/org/greenstone/gatherer/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/gui/FormatConversionDialog.java

    r29012 r29016  
    295295     * Then the cmdline program exits by printing the result of the conversion.
    296296     *
    297      * Explicitly sending EOFs from java is no longer necessary, as the SendStreamGobbler
     297     * Explicitly sending EOFs from java is no longer necessary, as the OutputStreamGobbler
    298298     * Thread takes care of closing the process stream.
    299299     *
     
    330330
    331331        // send inputstr to process
    332         SendStreamGobbler inputGobbler = new SendStreamGobbler(prcs.getOutputStream(), inputstr);
     332        OutputStreamGobbler inputGobbler = new OutputStreamGobbler(prcs.getOutputStream(), inputstr);
    333333       
    334334        // monitor for any error messages
    335             ReadStreamGobbler errorGobbler = new ReadStreamGobbler(prcs.getErrorStream(), true);
     335            InputStreamGobbler errorGobbler = new InputStreamGobbler(prcs.getErrorStream(), true);
    336336           
    337337            // monitor for the expected output line(s)
    338             ReadStreamGobbler outputGobbler = new ReadStreamGobbler(prcs.getInputStream());
     338            InputStreamGobbler outputGobbler = new InputStreamGobbler(prcs.getInputStream());
    339339
    340340            // kick them off
     
    947947
    948948    // http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html?page=2
    949     class ReadStreamGobbler extends Thread
     949    class InputStreamGobbler extends Thread
    950950    {
    951951    InputStream is = null;
     
    954954   
    955955   
    956     public ReadStreamGobbler(InputStream is)
     956    public InputStreamGobbler(InputStream is)
    957957    {
    958958        this.is = is;
     
    960960    }
    961961
    962     public ReadStreamGobbler(InputStream is, boolean split_newlines)
     962    public InputStreamGobbler(InputStream is, boolean split_newlines)
    963963    {
    964964        this.is = is;
     
    992992    }
    993993   
    994     class SendStreamGobbler extends Thread
     994    class OutputStreamGobbler extends Thread
    995995    {
    996996    OutputStream os = null;
    997997    String inputstr = "";
    998998
    999     public SendStreamGobbler(OutputStream os, String inputstr)
     999    public OutputStreamGobbler(OutputStream os, String inputstr)
    10001000    {
    10011001        this.os = os;
  • main/trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r29012 r29016  
    444444            // the workspace needs to be refreshed (Documents in Greenstone Collections)
    445445
    446         System.err.print("@@@ User chose to press: ");
    447         if(result == CANCEL_OPTION) {
    448         System.err.println("cancel");
    449         } else {
    450         System.err.println("ok");
    451         }
    452446    }
    453447    }
Note: See TracChangeset for help on using the changeset viewer.