org.mortbay.util

Class RolloverFileOutputStream


public class RolloverFileOutputStream
extends FilterOutputStream

A File OutputStream that rolls overs. If the passed filename contains the string "yyyy_mm_dd" on daily intervals.
Version:
$Id: RolloverFileOutputStream.java,v 1.14 2005/08/13 00:01:28 gregwilkins Exp $
Author:
Greg Wilkins (gregw)

Constructor Summary

RolloverFileOutputStream(String filename)
RolloverFileOutputStream(String filename, boolean append)
RolloverFileOutputStream(String filename, boolean append, int retainDays)

Method Summary

void
close()
String
getDatedFilename()
String
getFilename()
int
getRetainDays()
void
write(byte[] buf)
void
write(byte[] buf, int off, int len)

Constructor Details

RolloverFileOutputStream

public RolloverFileOutputStream(String filename)
            throws IOException

RolloverFileOutputStream

public RolloverFileOutputStream(String filename,
                                boolean append)
            throws IOException

RolloverFileOutputStream

public RolloverFileOutputStream(String filename,
                                boolean append,
                                int retainDays)
            throws IOException

Method Details

close

public void close()
            throws IOException

getDatedFilename

public String getDatedFilename()

getFilename

public String getFilename()

getRetainDays

public int getRetainDays()

write

public void write(byte[] buf)
            throws IOException

write

public void write(byte[] buf,
                  int off,
                  int len)
            throws IOException

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.