JBoss STDIO 1.0.0.GA

org.jboss.stdio
Class AbstractLoggingWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.jboss.stdio.AbstractLoggingWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
LoggingWriter

public abstract class AbstractLoggingWriter
extends Writer

Abstract base class for writers which log to a logger.


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
protected AbstractLoggingWriter()
          Construct a new instance.
 
Method Summary
 void close()
          
 void flush()
          
protected abstract  Level getLevel()
          Get the level at which to log.
protected abstract  Logger getLogger()
          Get the logger to use.
 void write(char[] cbuf, int off, int len)
          
 void write(int c)
          
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLoggingWriter

protected AbstractLoggingWriter()
Construct a new instance.

Method Detail

write

public void write(int c)
           throws IOException

Overrides:
write in class Writer
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException

Specified by:
write in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException

Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException

getLogger

protected abstract Logger getLogger()
Get the logger to use.

Returns:
the logger

getLevel

protected abstract Level getLevel()
Get the level at which to log.

Returns:
the level

close

public void close()
           throws IOException

Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

JBoss STDIO 1.0.0.GA

Copyright © 2010 JBoss, a division of Red Hat, Inc.