com.caucho.vfs
Class RotateStream

java.lang.Object
  |
  +--com.caucho.vfs.RotateStream
All Implemented Interfaces:
CronListener, java.util.EventListener

public class RotateStream
extends java.lang.Object
implements CronListener

Automatically-rotating streams


Method Summary
 boolean canWrite()
          True if the stream can write
static RotateStream create(Path path)
          Returns the rotate stream corresponding to this path
 WriteStream getStream()
          Gets the current write stream
 void handleCron(Cron cron)
          Handles a callback from an alarm.
static void setStderr(Path path)
          Sets path as the backing stream for System.err
static void setStdout(Path path)
          Sets path as the backing stream for System.out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static RotateStream create(Path path)
Returns the rotate stream corresponding to this path

setStdout

public static void setStdout(Path path)
Sets path as the backing stream for System.out

setStderr

public static void setStderr(Path path)
Sets path as the backing stream for System.err

canWrite

public boolean canWrite()
True if the stream can write

getStream

public WriteStream getStream()
Gets the current write stream

handleCron

public void handleCron(Cron cron)
Description copied from interface: CronListener
Handles a callback from an alarm.
Specified by:
handleCron in interface CronListener