|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.abstracthorizon.danube.support.logging.LoggingOutputStream
public class LoggingOutputStream
Output stream for logging. An given stream is duplicated to log stream as well.
| Field Summary | |
|---|---|
protected boolean |
logging
Is logging switched flag |
protected OutputStream |
logOutputStream
Log output stream |
protected OutputStream |
outputStream
Original output stream |
| Constructor Summary | |
|---|---|
LoggingOutputStream(OutputStream outputStream,
OutputStream logOutputStream)
Constructor |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
boolean |
isLogging()
Returns true if logging is on |
void |
setLogging(boolean logging)
Should written bytes from output stream be copied to the output stream |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OutputStream outputStream
protected OutputStream logOutputStream
protected boolean logging
| Constructor Detail |
|---|
public LoggingOutputStream(OutputStream outputStream,
OutputStream logOutputStream)
outputStream - output streamlogOutputStream - log output stream| Method Detail |
|---|
public void setLogging(boolean logging)
logging - true if logging is onpublic boolean isLogging()
true if logging is on
true if logging is on
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
public void write(byte[] b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public void write(int b)
throws IOException
write in class OutputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||