|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.vfs.StreamImpl
com.caucho.log.TimestampFilter
public class TimestampFilter
Automatically-rotating streams. Normally, clients will call getStream instead of using the StreamImpl interface.
| Field Summary |
|---|
| Fields inherited from class com.caucho.vfs.StreamImpl |
|---|
_nullPath, _path |
| Constructor Summary | |
|---|---|
TimestampFilter()
Create listener. |
|
TimestampFilter(WriteStream out,
java.lang.String timestamp)
Create listener. |
|
| Method Summary | |
|---|---|
boolean |
canWrite()
Returns true if the stream can write. |
void |
close()
Flushes the data. |
void |
flush()
Flushes the data. |
Path |
getPath()
Returns the Path associated with the stream. |
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, closeWrite, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getReadBuffer, getReadPosition, hasSkip, read, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimestampFilter()
path - underlying log path
public TimestampFilter(WriteStream out,
java.lang.String timestamp)
path - underlying log path| Method Detail |
|---|
public void setTimestamp(java.lang.String timestamp)
public void setStream(WriteStream stream)
public Path getPath()
StreamImpl
getPath in class StreamImplpublic boolean canWrite()
canWrite in class StreamImpl
public void write(byte[] buffer,
int offset,
int length,
boolean isEnd)
throws java.io.IOException
write in class StreamImplbuffer - 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.
java.io.IOException
public void flush()
throws java.io.IOException
flush in class StreamImpljava.io.IOException
public void close()
throws java.io.IOException
close in class StreamImpljava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||