org.objectweb.dsrg.sofa.deployment.util
Class Log4jOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.objectweb.dsrg.sofa.deployment.util.Log4jOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class Log4jOutputStream
extends java.io.OutputStream


Field Summary
static int DEFAULT_BUFFER_LENGTH
           
protected static java.lang.String LINE_SEPARATOR
           
 
Constructor Summary
Log4jOutputStream(org.apache.log4j.Logger logger, org.apache.log4j.Level level)
           
Log4jOutputStream(org.apache.log4j.Logger logger, org.apache.log4j.Level level, java.lang.ClassLoader classLoader)
           
 
Method Summary
protected  boolean bufferEndsWithNewline()
           
 void close()
           
 void flush()
           
protected  java.lang.ClassLoader switchClassLoader(java.lang.ClassLoader cloader)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_LENGTH

public static final int DEFAULT_BUFFER_LENGTH
See Also:
Constant Field Values

LINE_SEPARATOR

protected static final java.lang.String LINE_SEPARATOR
Constructor Detail

Log4jOutputStream

public Log4jOutputStream(org.apache.log4j.Logger logger,
                         org.apache.log4j.Level level,
                         java.lang.ClassLoader classLoader)

Log4jOutputStream

public Log4jOutputStream(org.apache.log4j.Logger logger,
                         org.apache.log4j.Level level)
Method Detail

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

bufferEndsWithNewline

protected boolean bufferEndsWithNewline()

switchClassLoader

protected java.lang.ClassLoader switchClassLoader(java.lang.ClassLoader cloader)

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException