org.apache.openjpa.lib.log
Class LogOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.apache.openjpa.lib.log.LogOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class LogOutputStream
- extends ByteArrayOutputStream
Many standard components log to OutputStreams.
This wrapper class extends the ByteArrayOutputStream
class and writes all given data to an underlying Log instance
whenever it is flushed and the internally held byte array contains a newline.
- Author:
- Abe White, Marc Prud'hommeaux
|
Method Summary |
void |
flush()
|
LogOutputStream
public LogOutputStream(Log log,
int level)
- Constructor.
- Parameters:
log - the log to log tolevel - the level to log at
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable- Overrides:
flush in class OutputStream
- Throws:
IOException
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.