public class FileStreamDumper extends Object implements StreamDumper
OutputStreams and send a copy to file once it has been read.
The output file will be rotated on demand. Files older than 1h will be deleted.| Modifier and Type | Field and Description |
|---|---|
Duration |
keepDumpsDuration |
| Constructor and Description |
|---|
FileStreamDumper(Path dumpDir) |
FileStreamDumper(Path dumpDir,
Clock clock,
Duration keepDumpsDuration)
Creates a StreamDumper that will dump to
dumpDir. |
| Modifier and Type | Method and Description |
|---|---|
void |
rotate()
Call this method when the output should be rotated.
|
InputStream |
wrap(InputStream inputStream)
Wraps a stream and dumps its content once it is closed.
|
public final Duration keepDumpsDuration
public FileStreamDumper(Path dumpDir)
public InputStream wrap(InputStream inputStream)
StreamDumperwrap in interface StreamDumperpublic void rotate()
StreamDumperrotate in interface StreamDumperCopyright © 2019. All rights reserved.