org.apache.log.output.io
public class StreamTarget extends AbstractOutputTarget
Field Summary | |
---|---|
String | m_encoding The encoding to use when creating byte array for string, may be null. |
OutputStream | m_outputStream OutputStream we are writing to. |
Constructor Summary | |
---|---|
StreamTarget(OutputStream outputStream, Formatter formatter, String encoding)
Constructor that writes to a stream and uses a particular formatter.
| |
StreamTarget(OutputStream outputStream, Formatter formatter)
Constructor that writes to a stream and uses a particular formatter.
|
Method Summary | |
---|---|
void | close()
Shutdown target.
|
protected void | setOutputStream(OutputStream outputStream)
Set the output stream.
|
protected void | shutdownStream()
Shutdown output stream. |
protected void | write(String data)
Abstract method that will output event.
|
Parameters: outputStream the OutputStream to write to formatter the Formatter to use encoding Desired encoding to use when writing to the log, null implies the default system encoding.
Parameters: outputStream the OutputStream to write to formatter the Formatter to use
Parameters: outputStream the new OutputStream
Parameters: data the data to be output