ParkNPark.tests
Class ErrorCopier
java.lang.Object
java.lang.Thread
ParkNPark.tests.InputCopier
ParkNPark.tests.ErrorCopier
- All Implemented Interfaces:
- Runnable
public class ErrorCopier
- extends InputCopier
Copies all errors to the given writer and flushes immediately after
Method Summary |
protected void |
closeWriter()
Don't close the output writer, because we don't want
to close stderr |
protected void |
lineProcessed(String line)
Called after a line has been written to the writer |
protected String |
processLine(String line)
Processes the given line and returns the line that should
be written to the writer or null if the copier
should stop copying |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, 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 |
processInfo
ProcessInfo processInfo
ErrorCopier
public ErrorCopier(ProcessInfo processInfo,
Reader reader,
Writer writer)
processLine
protected String processLine(String line)
- Description copied from class:
InputCopier
- Processes the given line and returns the line that should
be written to the writer or null if the copier
should stop copying
- Overrides:
processLine
in class InputCopier
- Parameters:
line
- The line returned from the reader
- Returns:
- The line to write to the writer or null if the
copier should stop copying
lineProcessed
protected void lineProcessed(String line)
- Description copied from class:
InputCopier
- Called after a line has been written to the writer
- Overrides:
lineProcessed
in class InputCopier
- Parameters:
line
- The line that was written to the writer
closeWriter
protected void closeWriter()
- Don't close the output writer, because we don't want
to close stderr
- Overrides:
closeWriter
in class InputCopier