public class RolloverFileOutputStream extends FilterOutputStream
out
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getDatedFilename() |
String |
getFilename() |
int |
getRetainDays() |
void |
write(byte[] buf) |
void |
write(byte[] buf,
int off,
int len) |
flush, write
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
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
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
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
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
public String getFilename()
public String getDatedFilename()
public int getRetainDays()
public void write(byte[] buf) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] buf, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
Copyright © 1995-2015 Webtide. All Rights Reserved.