public class HecSwappingOutputStream
extends java.io.OutputStream
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this file output stream and releases any system resources associated with this stream.
|
java.lang.String |
getLogFileName()
get the name of the log file current being written to
|
static HecSwappingOutputStream |
getOutputStream()
return the current HecSwappingOutputStream, if one hasn't been
created then create it with the System properties or defaults if
the system properties are not set.
|
static HecSwappingOutputStream |
getOutputStream(java.lang.String name,
int numLogs,
int logSize,
boolean toConsole)
return the current HecSwappingOutputStream, if one hasn't been
created then create it with the specified arguments.
|
void |
write(byte[] b)
Writes b.length bytes from the specified byte array to this file output stream.
|
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at offset off to this file output stream.
|
void |
write(int b)
Writes the specified byte to this file output stream.
|
public static HecSwappingOutputStream getOutputStream(java.lang.String name, int numLogs, int logSize, boolean toConsole) throws java.io.IOException
name - - name of logfile.numLogs - - number of logfile to maintain.logSize - - max size of log file before swapping to next logfile. 0 means no swappingjava.io.IOExceptionpublic static HecSwappingOutputStream getOutputStream() throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getLogFileName()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException