|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 streamMethod Detail |
---|
public void setLogging(boolean logging)
logging
- true
if logging is onpublic boolean isLogging()
true
if logging is on
true
if logging is onpublic void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |