java.lang.Object | |
↳ | android.webkit.WebResourceResponse |
Encapsulates a resource response. Applications can return an instance of this
class from
shouldInterceptRequest(WebView, String)
to provide a custom
response when the WebView requests a particular resource.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructs a resource response with the given MIME type, encoding, and
input stream.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Gets the input stream that provides the resource respone's data.
|
||||||||||
|
Gets the resource response's encoding.
|
||||||||||
|
Gets the resource response's MIME type.
|
||||||||||
|
Sets the input stream that provides the resource respone's data.
|
||||||||||
|
Sets the resource response's encoding, for example UTF-8.
|
||||||||||
|
Sets the resource response's MIME type, for example text/html.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs a resource response with the given MIME type, encoding, and
input stream. Callers must implement
InputStream.read(byte[])
for the input
stream.
mimeType | the resource response's MIME type, for example text/html |
---|---|
encoding | the resource response's encoding |
data | the input stream that provides the resource response's data |
Gets the input stream that provides the resource respone's data.
Gets the resource response's encoding.
Gets the resource response's MIME type.
Sets the input stream that provides the resource respone's data. Callers
must implement
InputStream.read(byte[])
.
data | the input stream that provides the resource response's data |
---|
Sets the resource response's encoding, for example UTF-8. This is used to decode the data from the input stream.
encoding | the resource response's encoding |
---|
Sets the resource response's MIME type, for example text/html.
mimeType | the resource response's MIME type |
---|