public static final class LoadDataParams.Builder
extends java.lang.Object
LoadDataParams
.
Builders are created by invoking LoadDataParams.newBuilder(String)
. Each of the setter methods
modifies the state of the builder and returns the same instance. Builders are not thread-safe
and should not be used concurrently from multiple threads without external synchronization.
Modifier and Type | Method and Description |
---|---|
LoadDataParams.Builder |
baseUrl(java.lang.String baseUrl)
Sets the URL that will be used to resolve links with a relative path in the HTML
document.
|
LoadDataParams |
build()
Returns a new
LoadDataParams instance built from the current state of this
builder. |
LoadDataParams.Builder |
mimeType(MimeType mimeType)
Sets the MIME type of the data to load.
|
LoadDataParams.Builder |
shouldReplaceNavigationEntry(boolean shouldReplaceNavigationEntry)
Specifies whether the data will be loaded as a normal navigation and the current history
item should be replaced.
|
LoadDataParams.Builder |
textEncoding(java.lang.String textEncoding)
Sets the data encoding.
|
public LoadDataParams.Builder textEncoding(java.lang.String textEncoding)
textEncoding
- the data encodingjava.lang.IllegalArgumentException
- when textEncoding
is empty or blankpublic LoadDataParams.Builder baseUrl(java.lang.String baseUrl)
baseUrl
- the base URLjava.lang.IllegalArgumentException
- when baseUrl
is empty or blankpublic LoadDataParams.Builder mimeType(MimeType mimeType)
mimeType
- the MIME typepublic LoadDataParams.Builder shouldReplaceNavigationEntry(boolean shouldReplaceNavigationEntry)
shouldReplaceNavigationEntry
- the flag valuepublic LoadDataParams build()
LoadDataParams
instance built from the current state of this
builder.LoadDataParams
instance