net.sf.statsvn.util
Class ProcessUtils

java.lang.Object
  extended by net.sf.statsvn.util.ProcessUtils

public final class ProcessUtils
extends java.lang.Object

This class provides a way of launching new processes. It is not the best way and it surely does not work well in multi-threaded environments. It is sufficient for StatSVN's single thread. We should be launching two threads with readers for both, but we are lazy. http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html

Author:
jkealey

Constructor Summary
ProcessUtils()
          A utility class (only static methods) should be final and have a private constructor.
 
Method Summary
static ProcessUtils call(java.lang.String sCommand)
           
 void close()
           
protected  java.lang.String getErrorMessage()
           
 java.io.BufferedInputStream getErrorStream()
           
 java.io.BufferedInputStream getInputStream()
           
protected  boolean hasErrorOccured()
           
 void setErrorStream(java.io.InputStream errorStream)
           
 void setInputStream(java.io.InputStream inputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessUtils

public ProcessUtils()
A utility class (only static methods) should be final and have a private constructor.

Method Detail

call

public static ProcessUtils call(java.lang.String sCommand)
                         throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

hasErrorOccured

protected boolean hasErrorOccured()
                           throws java.io.IOException
Throws:
java.io.IOException

getErrorMessage

protected java.lang.String getErrorMessage()

getErrorStream

public java.io.BufferedInputStream getErrorStream()
Returns:
the errorStream

getInputStream

public java.io.BufferedInputStream getInputStream()
Returns:
the inputStream

setErrorStream

public void setErrorStream(java.io.InputStream errorStream)
Parameters:
errorStream - the errorStream to set

setInputStream

public void setInputStream(java.io.InputStream inputStream)
Parameters:
inputStream - the inputStream to set


Copyright © 2008. All Rights Reserved.