WebResourceResponse Constructors

Definition

Overloads

WebResourceResponse(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

WebResourceResponse(String, String, Stream)

Constructs a resource response with the given MIME type, character encoding, and input stream.

WebResourceResponse(String, String, Int32, String, IDictionary<String,String>, Stream)

Constructs a resource response with the given parameters.

WebResourceResponse(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected WebResourceResponse (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Webkit.WebResourceResponse : nativeint * Android.Runtime.JniHandleOwnership -> Android.Webkit.WebResourceResponse

Parameters

javaReference
IntPtr

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

WebResourceResponse(String, String, Stream)

Constructs a resource response with the given MIME type, character encoding, and input stream.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/io/InputStream;)V", "")]
public WebResourceResponse (string? mimeType, string? encoding, System.IO.Stream? data);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/io/InputStream;)V", "")>]
new Android.Webkit.WebResourceResponse : string * string * System.IO.Stream -> Android.Webkit.WebResourceResponse

Parameters

mimeType
String

the resource response's MIME type, for example "text/html".

encoding
String

the resource response's character encoding, for example "utf-8".

data
Stream

the input stream that provides the resource response's data. Must not be a StringBufferInputStream.

Attributes

Remarks

Java documentation for android.webkit.WebResourceResponse.WebResourceResponse(java.lang.String, java.lang.String, java.io.InputStream).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

WebResourceResponse(String, String, Int32, String, IDictionary<String,String>, Stream)

Constructs a resource response with the given parameters.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/util/Map;Ljava/io/InputStream;)V", "")]
public WebResourceResponse (string? mimeType, string? encoding, int statusCode, string reasonPhrase, System.Collections.Generic.IDictionary<string,string>? responseHeaders, System.IO.Stream? data);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/util/Map;Ljava/io/InputStream;)V", "")>]
new Android.Webkit.WebResourceResponse : string * string * int * string * System.Collections.Generic.IDictionary<string, string> * System.IO.Stream -> Android.Webkit.WebResourceResponse

Parameters

mimeType
String

the resource response's MIME type, for example "text/html".

encoding
String

the resource response's character encoding, for example "utf-8".

statusCode
Int32

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
String

the phrase describing the status code, for example "OK". Must be non-empty.

responseHeaders
IDictionary<String,String>

the resource response's headers represented as a mapping of header name -> header value.

data
Stream

the input stream that provides the resource response's data. Must not be a StringBufferInputStream.

Attributes

Remarks

Java documentation for android.webkit.WebResourceResponse.WebResourceResponse(java.lang.String, java.lang.String, int, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.io.InputStream).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to