| java.lang.Object com.sun.portal.fabric.util.StreamLogger
StreamLogger | class StreamLogger implements Runnable(Code) | | This class implements the logic for reading an Input Stream
that contains data being pushed from a process output or error streams.
The data is read from the stream and logged using a the logger
|
Constructor Summary | |
public | StreamLogger(InputStream is, String streamName, boolean storeContent) Constructor for the StreamLogger class
Parameters: is - Input Stream object passed by the caller to be read and logged. Parameters: streamName - A String that will be used as a Tag when logging the output. Parameters: storeContent - This boolean flag is used by this class to determineif the content in the Stream should be preserved andreturned as a String. |
Method Summary | |
public String | getContent() | public void | run() Implements the run method of the Runnable interface. |
StreamLogger | public StreamLogger(InputStream is, String streamName, boolean storeContent)(Code) | | Constructor for the StreamLogger class
Parameters: is - Input Stream object passed by the caller to be read and logged. Parameters: streamName - A String that will be used as a Tag when logging the output. Parameters: storeContent - This boolean flag is used by this class to determineif the content in the Stream should be preserved andreturned as a String. This flag should be used withcaution. If it is set to true and the Streamcontains a lot of data, the size of the StringBufferthat stores the output will grow very large and cancause out of memory conditions. |
getContent | public String getContent()(Code) | | Returns the content in the stream as a String
Content of this stream as a String.Returns a null if storeContent is set to false |
run | public void run()(Code) | | Implements the run method of the Runnable interface.
This method reads the InputStream in a Buffered Reader and logs the
each line in the BufferedReader into the Logger object.
|
|
|