com.caucho.vfs
Class TimestampFilter

java.lang.Object
  |
  +--com.caucho.vfs.StreamImpl
        |
        +--com.caucho.vfs.TimestampFilter

public class TimestampFilter
extends StreamImpl

Automatically-rotating streams. Normally, clients will call getStream instead of using the StreamImpl interface.


Fields inherited from class com.caucho.vfs.StreamImpl
nullPath, path
 
Method Summary
 boolean canWrite()
          Returns true if the stream can write.
 void close()
          Flushes the data.
 void flush()
          Flushes the data.
 void setStream(WriteStream stream)
           
 void setTimestamp(java.lang.String timestamp)
           
 void write(byte[] buffer, int offset, int length, boolean isEnd)
          Write data to the stream.
 
Methods inherited from class com.caucho.vfs.StreamImpl
canRead, clearWrite, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getPath, getReadPosition, hasSkip, read, removeAttribute, setAttribute, setPath, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setTimestamp

public void setTimestamp(java.lang.String timestamp)

setStream

public void setStream(WriteStream stream)

canWrite

public boolean canWrite()
Returns true if the stream can write.
Overrides:
canWrite in class StreamImpl

write

public void write(byte[] buffer,
                  int offset,
                  int length,
                  boolean isEnd)
           throws java.io.IOException
Write data to the stream.
Overrides:
write in class StreamImpl
Following copied from class: com.caucho.vfs.StreamImpl
Parameters:
buffer - the byte array to write.
offset - the offset into the byte array.
length - the number of bytes to write.
isEnd - true when the write is flushing a close.

flush

public void flush()
           throws java.io.IOException
Flushes the data.
Overrides:
flush in class StreamImpl

close

public void close()
           throws java.io.IOException
Flushes the data.
Overrides:
close in class StreamImpl