Class FetchOptions
java.lang.Object
org.netpreserve.jwarc.FetchOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyTo(OutputStream copyTo) If specified the response will also be copied to this OutputStream as well as the WARC file.maxLength(long bytes) Stops the fetch after this many bytes are received (including any protocol headers).maxTime(long millis) Stops the fetch after this many milliseconds have elapsed.readTimeout(int millis) Sets the read timeout in milliseconds on the socket.Sets the User-Agent request header.
-
Constructor Details
-
FetchOptions
public FetchOptions()
-
-
Method Details
-
maxLength
Stops the fetch after this many bytes are received (including any protocol headers). If this limit was reached the header "WARC-Truncated: length" will be added to the response record. -
maxTime
Stops the fetch after this many milliseconds have elapsed. If this limit was reached the header "WARC-Truncated: time" will be added to the response record. -
readTimeout
Sets the read timeout in milliseconds on the socket. Defaults to 60000. Set to 0 for no timout.- See Also:
-
userAgent
Sets the User-Agent request header. Default: "jwarc"If a custom HTTP request is provided this option will be ignored.
-
copyTo
If specified the response will also be copied to this OutputStream as well as the WARC file.
-