hudson.util.io
Class ReopenableRotatingFileOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by hudson.util.io.ReopenableFileOutputStream
          extended by hudson.util.io.ReopenableRotatingFileOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class ReopenableRotatingFileOutputStream
extends ReopenableFileOutputStream

ReopenableFileOutputStream that does log rotation upon rewind.

Since:
1.416
Author:
Kohsuke Kawaguchi

Field Summary
 
Fields inherited from class hudson.util.io.ReopenableFileOutputStream
out
 
Constructor Summary
ReopenableRotatingFileOutputStream(File out, int size)
           
 
Method Summary
 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.ReopenableFileOutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReopenableRotatingFileOutputStream

public ReopenableRotatingFileOutputStream(File out,
                                          int size)
Method Detail

getNumberedFileName

protected File getNumberedFileName(int n)

rewind

public void rewind()
            throws IOException
Description copied from class: ReopenableFileOutputStream
In addition to close, ensure that the next "open" would truncate the file.

Overrides:
rewind in class ReopenableFileOutputStream
Throws:
IOException

deleteAll

public void deleteAll()
Deletes all the log files, including rotated files.



Copyright © 2004-2013. All Rights Reserved.