Ignore:
Timestamp:
2017-04-06T19:15:55+12:00 (7 years ago)
Author:
ak19
Message:

In place of the Input- and OutputStreamGobbler classes, am now shifting GLI code to use SafeProcess too, copied across from GS3 src code. Class SafeProcess includes the two streamgobblers as static inner classes and some more functionality with safely running an external process from Java.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/GS3ServerThread.java

    r29361 r31582  
    8686            // And we'll catch the error and output streams to prevent them from blocking during waitFor()
    8787            // (For normal input and output stream handling using the Gobblers, see FormatConversionDialog.java)
    88             OutputStreamGobbler inputGobbler = new OutputStreamGobbler(p.getOutputStream(), null);         
    89             InputStreamGobbler errorGobbler = new InputStreamGobbler(p.getErrorStream(), true);
    90             InputStreamGobbler outputGobbler = new InputStreamGobbler(p.getInputStream());
     88            SafeProcess.OutputStreamGobbler inputGobbler
     89                = new SafeProcess.OutputStreamGobbler(p.getOutputStream(), null);           
     90            SafeProcess.InputStreamGobbler errorGobbler
     91                = new SafeProcess.InputStreamGobbler(p.getErrorStream(), true);
     92            SafeProcess.InputStreamGobbler outputGobbler
     93                = new SafeProcess.InputStreamGobbler(p.getInputStream());
    9194           
    9295            errorGobbler.start();
Note: See TracChangeset for help on using the changeset viewer.