Skip navigation links
oracle.dss.util.xdo.common.log
Class LogOutputStream
java.lang.Object
java.io.OutputStream
oracle.dss.util.xdo.common.log.LogOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
-
public class LogOutputStream
- extends java.io.OutputStream
Field Summary |
static java.lang.String |
RCS_ID
|
Constructor Summary |
LogOutputStream(java.io.OutputStream outStream, java.lang.String filename)
Log an OutStream to <LogDir>/filename.
|
Method Summary |
void |
close()
Closes the OutputStream for the log file. |
void |
flush()
The outStream for customers will only be flushed. |
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 |
RCS_ID
public static final java.lang.String RCS_ID
-
- See Also:
- Constant Field Values
LogOutputStream
public LogOutputStream(java.io.OutputStream outStream,
java.lang.String filename)
throws java.io.IOException
- Log an OutStream to <LogDir>/filename.
Usage:
out2 = new LogOutputStream( out, filename );
... process ...
out2.close(); // must close out2 all the time, out will not be closed here.
out.close(); // close out if necessary
- Parameters:
outStream
- an OutputStream to log
filename
- a file name of the log file (not a full path).
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- The outStream for customers will only be flushed.
The outputStream for logPath doesn't need to be flushed because this is written to filesystem directly.
-
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.OutputStream
-
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Closes the OutputStream for the log file.
The original OutputStream won't be closed.
-
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
-
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
-
- Specified by:
write
in class java.io.OutputStream
-
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
-
- Overrides:
write
in class java.io.OutputStream
-
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
-
- Overrides:
write
in class java.io.OutputStream
-
- Throws:
java.io.IOException
Skip navigation links
Copyright © 1997, 2009, Oracle. All rights reserved.