Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

abbot.util
Class ProcessOutputHandler  view ProcessOutputHandler download ProcessOutputHandler.java

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

public class ProcessOutputHandler
extends java.lang.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.


Nested Class Summary
private  class ProcessOutputHandler.Reader
          Simple stream reader.
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.lang.Runnable errorHandler
           
private  java.lang.Runnable outputHandler
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProcessOutputHandler(java.lang.Process p)
          Create an output handler for the given process.
ProcessOutputHandler(java.lang.String name, java.lang.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()
          The method of Thread that will be run if there is no Runnable object associated with the Thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Field Detail

outputHandler

private java.lang.Runnable outputHandler

errorHandler

private java.lang.Runnable errorHandler
Constructor Detail

ProcessOutputHandler

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


ProcessOutputHandler

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

Method Detail

run

public void run()
Description copied from class: java.lang.Thread
The method of Thread that will be run if there is no Runnable object associated with the Thread. Thread's implementation does nothing at all.


handleInput

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

handleError

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