public class XWalkWebResourceResponse
extends java.lang.Object
| Constructor and Description |
|---|
XWalkWebResourceResponse(java.lang.Object bridge) |
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getData()
Gets the input stream that provides the resource response's data.
|
java.lang.String |
getEncoding()
Gets the resource response's encoding.
|
java.lang.String |
getMimeType()
Gets the resource response's MIME type.
|
java.lang.String |
getReasonPhrase()
Gets the description of the resource response's status code.
|
java.util.Map<java.lang.String,java.lang.String> |
getResponseHeaders()
Gets the headers for the resource response.
|
int |
getStatusCode()
Gets the resource response's status code.
|
void |
setData(java.io.InputStream data)
Sets the input stream that provides the resource response's data.
|
void |
setEncoding(java.lang.String encoding)
Sets the resource response's encoding, for example "UTF-8".
|
void |
setMimeType(java.lang.String mimeType)
Sets the resource response's MIME type, for example "text/html".
|
void |
setResponseHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets the headers for the resource response.
|
void |
setStatusCodeAndReasonPhrase(int statusCode,
java.lang.String reasonPhrase)
Sets the resource response's status code and reason phrase.
|
public XWalkWebResourceResponse(java.lang.Object bridge)
public void setMimeType(java.lang.String mimeType)
mimeType - The resource response's MIME typepublic java.lang.String getMimeType()
public void setEncoding(java.lang.String encoding)
encoding - The resource response's encodingpublic java.lang.String getEncoding()
public void setData(java.io.InputStream data)
InputStream.read(byte[]).data - the input stream that provides the resource response's data. Must not be a
StringBufferInputStream.public java.io.InputStream getData()
public void setStatusCodeAndReasonPhrase(int statusCode,
java.lang.String reasonPhrase)
statusCode - 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 - the phrase describing the status code, for example "OK". Must be non-null
and not empty.public int getStatusCode()
public java.lang.String getReasonPhrase()
public void setResponseHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
headers - Mapping of header name to header value.public java.util.Map<java.lang.String,java.lang.String> getResponseHeaders()