Package org.microproxy.warc
Class WarcRecorder.Builder
java.lang.Object
org.microproxy.warc.WarcRecorder.Builder
- Enclosing class:
WarcRecorder
Options for
WarcRecorder.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates the configured WARC recorder.compress(boolean compress) Gzip each record (default true).maxBodySize(long bytes) Record at most this much of each body (default 512 MiB).maxFileSize(long bytes) Start a new file after this many bytes (default 1 GiB).File name prefix (default "microproxy").Thesoftwarefield of thewarcinforecords.
-
Method Details
-
prefix
File name prefix (default "microproxy").- Parameters:
prefix- the WARC file-name prefix- Returns:
- this builder
-
maxFileSize
Start a new file after this many bytes (default 1 GiB).- Parameters:
bytes- the file size in bytes at which to rotate to a new WARC file- Returns:
- this builder
-
maxBodySize
Record at most this much of each body (default 512 MiB).- Parameters:
bytes- the maximum bytes to record from each body- Returns:
- this builder
-
compress
Gzip each record (default true).- Parameters:
compress- whether to gzip each WARC record- Returns:
- this builder
-
software
Thesoftwarefield of thewarcinforecords.- Parameters:
software- the software identification written to warcinfo records- Returns:
- this builder
-
build
Creates the configured WARC recorder.- Returns:
- the configured WARC recorder
- Throws:
IOException- if the recording directory cannot be created
-