|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.log.output.AbstractTarget
org.apache.log.output.AbstractOutputTarget
org.apache.log.output.io.StreamTarget
public class StreamTarget
A basic target that writes to an OutputStream.
| Field Summary | |
|---|---|
private String |
m_encoding
The encoding to use when creating byte array for string, may be null. |
private OutputStream |
m_outputStream
OutputStream we are writing to. |
| Constructor Summary | |
|---|---|
StreamTarget(OutputStream outputStream,
Formatter formatter)
Constructor that writes to a stream and uses a particular formatter. |
|
StreamTarget(OutputStream outputStream,
Formatter formatter,
String encoding)
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. |
| Methods inherited from class org.apache.log.output.AbstractOutputTarget |
|---|
doProcessEvent, getFormatter, open |
| Methods inherited from class org.apache.log.output.AbstractTarget |
|---|
getErrorHandler, isOpen, processEvent, setErrorHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private OutputStream m_outputStream
private String m_encoding
| Constructor Detail |
|---|
public StreamTarget(OutputStream outputStream,
Formatter formatter,
String encoding)
outputStream - the OutputStream to write toformatter - the Formatter to useencoding - Desired encoding to use when writing to the log, null
implies the default system encoding.
public StreamTarget(OutputStream outputStream,
Formatter formatter)
outputStream - the OutputStream to write toformatter - the Formatter to use| Method Detail |
|---|
protected void setOutputStream(OutputStream outputStream)
outputStream - the new OutputStreamprotected void write(String data)
write in class AbstractOutputTargetdata - the data to be outputpublic void close()
close in interface Closeableclose in class AbstractOutputTargetprotected void shutdownStream()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||