com.atlassian.fisheye.plugins.scm.utils.process
Class StringOutputHandler

java.lang.Object
  extended by com.atlassian.fisheye.plugins.scm.utils.process.BaseOutputHandler
      extended by com.atlassian.fisheye.plugins.scm.utils.process.StringOutputHandler
All Implemented Interfaces:
OutputHandler

public class StringOutputHandler
extends BaseOutputHandler

An Output Handler which captures the output stream to a string


Constructor Summary
StringOutputHandler()
           
StringOutputHandler(java.lang.String encoding)
           
 
Method Summary
 void complete()
          Called when the process completes.
 java.lang.String getOutput()
           
 void process(java.io.InputStream output)
          Process an output stream generated by the external process (either stdout or stderr)
 
Methods inherited from class com.atlassian.fisheye.plugins.scm.utils.process.BaseOutputHandler
cancelProcess, resetWatchdog, setWatchdog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringOutputHandler

public StringOutputHandler()

StringOutputHandler

public StringOutputHandler(java.lang.String encoding)
Method Detail

process

public void process(java.io.InputStream output)
             throws ProcessException
Description copied from interface: OutputHandler
Process an output stream generated by the external process (either stdout or stderr)

Parameters:
output - the external process' output stream (available as an input to this class)
Throws:
ProcessException - if there is a problem processing the output

getOutput

public java.lang.String getOutput()

complete

public void complete()
Description copied from interface: OutputHandler
Called when the process completes. This call allows the output handler to close any open resources and finalize any processing.

Specified by:
complete in interface OutputHandler
Overrides:
complete in class BaseOutputHandler