Package hudson.util.io
Class RewindableRotatingFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- hudson.util.io.RewindableFileOutputStream
-
- hudson.util.io.RewindableRotatingFileOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class RewindableRotatingFileOutputStream extends RewindableFileOutputStream
ReopenableFileOutputStream
that does log rotation upon rewind.- Since:
- 2.18
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from class hudson.util.io.RewindableFileOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description RewindableRotatingFileOutputStream(File out, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteAll()
Deletes all the log files, including rotated files.protected File
getNumberedFileName(int n)
void
rewind()
In addition to close, ensure that the next "open" would truncate the file.-
Methods inherited from class hudson.util.io.RewindableFileOutputStream
close, flush, write, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
RewindableRotatingFileOutputStream
public RewindableRotatingFileOutputStream(File out, int size)
-
-
Method Detail
-
getNumberedFileName
protected File getNumberedFileName(int n)
-
rewind
public void rewind() throws IOException
Description copied from class:RewindableFileOutputStream
In addition to close, ensure that the next "open" would truncate the file.- Overrides:
rewind
in classRewindableFileOutputStream
- Throws:
IOException
-
deleteAll
public void deleteAll()
Deletes all the log files, including rotated files.
-
-