org.eclipse.jetty.util
类 RolloverFileOutputStream

java.lang.Object
  继承者 java.io.OutputStream
      继承者 java.io.FilterOutputStream
          继承者 org.eclipse.jetty.util.RolloverFileOutputStream
所有已实现的接口:
Closeable, Flushable

public class RolloverFileOutputStream
extends FilterOutputStream

RolloverFileOutputStream This output stream puts content in a file that is rolled over every 24 hours. The filename must include the string "yyyy_mm_dd", which is replaced with the actual date when creating and rolling over the file. Old files are retained for a number of days before being deleted.


字段摘要
 
从类 java.io.FilterOutputStream 继承的字段
out
 
构造方法摘要
RolloverFileOutputStream(String filename)
           
RolloverFileOutputStream(String filename, boolean append)
           
RolloverFileOutputStream(String filename, boolean append, int retainDays)
           
RolloverFileOutputStream(String filename, boolean append, int retainDays, TimeZone zone)
           
RolloverFileOutputStream(String filename, boolean append, int retainDays, TimeZone zone, String dateFormat, String backupFormat)
           
 
方法摘要
 void close()
           
 String getDatedFilename()
           
 String getFilename()
           
 int getRetainDays()
           
 void write(byte[] buf)
           
 void write(byte[] buf, int off, int len)
           
 
从类 java.io.FilterOutputStream 继承的方法
flush, write
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

RolloverFileOutputStream

public RolloverFileOutputStream(String filename)
                         throws IOException
参数:
filename - The filename must include the string "yyyy_mm_dd", which is replaced with the actual date when creating and rolling over the file.
抛出:
IOException

RolloverFileOutputStream

public RolloverFileOutputStream(String filename,
                                boolean append)
                         throws IOException
参数:
filename - The filename must include the string "yyyy_mm_dd", which is replaced with the actual date when creating and rolling over the file.
append - If true, existing files will be appended to.
抛出:
IOException

RolloverFileOutputStream

public RolloverFileOutputStream(String filename,
                                boolean append,
                                int retainDays)
                         throws IOException
参数:
filename - The filename must include the string "yyyy_mm_dd", which is replaced with the actual date when creating and rolling over the file.
append - If true, existing files will be appended to.
retainDays - The number of days to retain files before deleting them. 0 to retain forever.
抛出:
IOException

RolloverFileOutputStream

public RolloverFileOutputStream(String filename,
                                boolean append,
                                int retainDays,
                                TimeZone zone)
                         throws IOException
参数:
filename - The filename must include the string "yyyy_mm_dd", which is replaced with the actual date when creating and rolling over the file.
append - If true, existing files will be appended to.
retainDays - The number of days to retain files before deleting them. 0 to retain forever.
抛出:
IOException

RolloverFileOutputStream

public RolloverFileOutputStream(String filename,
                                boolean append,
                                int retainDays,
                                TimeZone zone,
                                String dateFormat,
                                String backupFormat)
                         throws IOException
参数:
filename - The filename must include the string "yyyy_mm_dd", which is replaced with the actual date when creating and rolling over the file.
append - If true, existing files will be appended to.
retainDays - The number of days to retain files before deleting them. 0 to retain forever.
dateFormat - The format for the date file substitution. The default is "yyyy_MM_dd".
backupFormat - The format for the file extension of backup files. The default is "HHmmssSSS".
抛出:
IOException
方法详细信息

getFilename

public String getFilename()

getDatedFilename

public String getDatedFilename()

getRetainDays

public int getRetainDays()

write

public void write(byte[] buf)
           throws IOException
覆盖:
FilterOutputStream 中的 write
抛出:
IOException

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws IOException
覆盖:
FilterOutputStream 中的 write
抛出:
IOException

close

public void close()
           throws IOException
指定者:
接口 Closeable 中的 close
覆盖:
FilterOutputStream 中的 close
抛出:
IOException


Copyright © 2013. All Rights Reserved.