public class UserAgentSettings extends Object
toString()
method:
SETTINGS: showWarnings: false showHeaders: false showTravel: false genericXMLMode: false charset: UTF-8 outputPath: <<System.getProperty("user.dir")>> autoRedirect: true maxRedirects: 5 maxBytes: -1 responseTimeout: 0 checkSSLCerts: true autoSaveAsHTML: false autoSaveAsXML: false autosaveJSON: false defaultRequestHeaders: accept: ∗/∗ accept-language: en-us accept-encoding: gzip connection: Keep-Alive user-agent: Jaunt/1.5
Modifier and Type | Field and Description |
---|---|
boolean |
autoRedirect
UserAgent setting indicating whether to automatically follow meta tag redirects that occur in the head section.
|
boolean |
autoSaveAsHTML
UserAgent setting indicating whether to automatically save the source of each visited page as HTML in LAST_VISITED.htm.
|
boolean |
autoSaveAsXML
UserAgent setting indicating whether to automatically save the source of each visited page as XHTML in LAST_VISITED.xml.
|
boolean |
autoSaveJSON
UserAgent setting indicating whether to automatically save the last retrieved JSON object in LAST_VISITED.json.
|
String |
charset
UserAgent setting indicating which Charset encoding to use - supports canonical name or an alias.
|
boolean |
checkSSLCerts
UserAgent setting indicating whether to check SSL certificates for validity or blindly trust all certificates (including self-signed certificates).
|
Map<String,String> |
defaultRequestHeaders
Map holding the default headers that the UserAgent sends with every HttpRequest; keys are header names (eg "user-agent") and values are header values (eg "Jaunt/0.9.x")
|
boolean |
genericXMLMode
Whether to parse content as generic XML instead of HTML/XHTML.
|
int |
maxBytes
UserAgent setting indicating the maximum number of bytes of response content processed by the parser, after which point no further content is parsed; the value -1 indicates no limit; in cases where the resultant Document is truncated as a result of this setting, the flag Document.truncated is set to true.
|
int |
maxRedirects
UserAgent setting indicating the maximum number of consecutive redirects to attempt before failing.
|
String |
outputPath
UserAgent setting indicating the output folder for save-related methods; the default value is System.getProperty("user.dir");
|
long |
responseTimeout
UserAgent setting indicating milliseconds to wait for a completed response (including any redirects) before throwing a ResponseException; default of 0 represents no application of a timer.
|
boolean |
showHeaders
UserAgent setting indicating whether to print HTTP request headers and response headers to System.out.
|
boolean |
showTravel
UserAgent setting indicating whether to print current request/location to System.out (including requests when downloading a complete web page).
|
boolean |
showWarnings
UserAgent setting indicating whether to print warning messages to System.out.
|
public String charset
public boolean autoRedirect
public boolean showWarnings
public boolean showHeaders
public boolean showTravel
public boolean genericXMLMode
public boolean checkSSLCerts
public boolean autoSaveAsHTML
public boolean autoSaveAsXML
public boolean autoSaveJSON
public String outputPath
public int maxRedirects
public int maxBytes
public Map<String,String> defaultRequestHeaders
public long responseTimeout