public class FetchOptions extends Object
WarcWriter.fetch(URI, FetchOptions)| Constructor and Description |
|---|
FetchOptions() |
| Modifier and Type | Method and Description |
|---|---|
FetchOptions |
copyTo(OutputStream copyTo)
If specified the response will also be copied to this OutputStream as well as the WARC file.
|
FetchOptions |
maxLength(long bytes)
Stops the fetch after this many bytes are received (including any protocol headers).
|
FetchOptions |
maxTime(long millis)
Stops the fetch after this many milliseconds have elapsed.
|
FetchOptions |
readTimeout(int millis)
Sets the read timeout in milliseconds on the socket.
|
FetchOptions |
userAgent(String userAgent)
Sets the User-Agent request header.
|
public FetchOptions maxLength(long bytes)
public FetchOptions maxTime(long millis)
public FetchOptions readTimeout(int millis)
Socket.setSoTimeout(int)public FetchOptions userAgent(String userAgent)
If a custom HTTP request is provided this option will be ignored.
public FetchOptions copyTo(OutputStream copyTo)
Copyright © 2023. All rights reserved.