abbot.util
Class ProcessOutputHandler

java.lang.Object
  extended byjava.lang.Thread
      extended byabbot.util.ProcessOutputHandler
All Implemented Interfaces:
Runnable

public class ProcessOutputHandler
extends Thread

Default process output handler, redirecting the subprocesses output to System.out and System.err. Override the handleOutput and handleError methods in order to get different results.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProcessOutputHandler(Process p)
          Create an output handler for the given process.
ProcessOutputHandler(String name, Process p)
          Create an output handler for the given process.
 
Method Summary
protected  void handleError(byte[] buf, int len)
           
protected  void handleInput(byte[] buf, int len)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessOutputHandler

public ProcessOutputHandler(Process p)
Create an output handler for the given process.


ProcessOutputHandler

public ProcessOutputHandler(String name,
                            Process p)
Create an output handler for the given process.

Method Detail

run

public void run()

handleInput

protected void handleInput(byte[] buf,
                           int len)

handleError

protected void handleError(byte[] buf,
                           int len)


Copyright © 2002-2004 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge