@Module public class TimestampFilter extends StreamImpl
_nullPath, _path| Constructor and Description |
|---|
TimestampFilter()
Create listener.
|
TimestampFilter(WriteStream out,
java.lang.String timestamp)
Create listener.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
setNullDelimited(boolean isNullDelimited)
If null-delimited, the timestamp only applies after the cr/lf and a null
|
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.
|
canRead, clearWrite, closeWrite, flushBuffer, flushToDisk, getAttribute, getAttributeNames, getAvailable, getFlushOnNewline, getNewline, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, isMmapEnabled, isSendfileEnabled, read, readNonBlock, readTimeout, removeAttribute, seekEnd, seekStart, setAttribute, setPath, setWriteEncoding, skip, write, writeMmap, writeSendfilepublic TimestampFilter()
path - underlying log pathpublic TimestampFilter(WriteStream out, java.lang.String timestamp)
path - underlying log pathpublic void setNullDelimited(boolean isNullDelimited)
public void setTimestamp(java.lang.String timestamp)
public void setStream(WriteStream stream)
public Path getPath()
StreamImplgetPath in class StreamImplpublic boolean canWrite()
canWrite in class StreamImplpublic 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.IOExceptionpublic void flush()
throws java.io.IOException
flush in class StreamImpljava.io.IOExceptionpublic void close()
throws java.io.IOException
close in class StreamImpljava.io.IOException