WebkitWebResourceResponse
WebkitWebResourceResponse
Functions:
- Create (MimeType As String, Encoding As String, Data As InputStream) As String
Constructs a resource response with the given MIME type, character encoding, and input stream.
MimeType As String - the resource response's MIME type, for example "text/html".
Encoding As String - the resource response's character encoding, for example "utf-8".
Data As InputStream - the input stream that provides the resource response's data.
Added in API level 11.
- Create2 (MimeType As String, Encoding As String, StatusCode As Int, ReasonPhrase As String, ResponseHeaders As Map, Data As InputStream) As String
Constructs a resource response with the given parameters.
MimeType As String - the resource response's MIME type, for example "text/html".
Encoding As String - the resource response's character encoding, for example "utf-8".
StatusCode As Int - the status code needs to be in the ranges [100, 299], [400, 599]. Causing a redirect by specifying a 3xx code is not supported.
ReasonPhrase As String - the phrase describing the status code, for example "OK". Must be non-empty. This value cannot be null.
ResponseHeaders As Map - the resource response's headers represented as a mapping of header name -> header value.
Data As InputStream - the input stream that provides the resource response's data.
Added in API level 21.
- Initialize (AndroidWebkitWebResourceResponse As Object) As String
Initializes the object.
AndroidWebkitWebResourceResponse As Object - android.webkit.WebResourceResponse from Java code. Pass Null if you want to create new instance.
Use Create or Create2 methods to set new instance parameters.
Added in API level 11.
- StatusCodeAndReasonPhrase (StatusCode As Int, ReasonPharse As String) As String
Sets the resource response's status code and reason phrase.
StatusCode As Int - the status code needs to be in the ranges [100, 299], [400, 599]. Causing a redirect by specifying a 3xx code is not supported.
ReasonPharse As String - the phrase describing the status code, for example "OK". Must be non-empty. This value cannot be Null.
Added in API level 21.
- toObject As Object
Returns Object as android.webkit.WebResourceResponse which can be used in Java Code.
Added in API level 11.
- IsInitialized As Boolean
Tests whether the object has been initialized.
Properties:
- Data As InputStream
Gets or sets the input stream that provides the resource response's data.
Added in API level 11.
- Encoding As String
Gets or sets the resource response's encoding.
Added in API level 11.
- MimeType As String
Gets or sets the resource response's MIME type.
Added in API level 11.
- ReasonPhrase As String [read only]
Gets the description of the resource response's status code.
Added in API level 21.
- ResponseHeaders As Map
Gets or sets the headers for the resource response.
Added in API level 21.
- StatusCode As Int [read only]
Gets the resource response's status code.
Added in API level 21.