java.lang.Object | |
↳ | com.pspdfkit.document.html.ResourceResponse |
Encapsulates resource response. Custom response can be returned in shouldInterceptRequest(ResourceRequest)
to override HTML page loading.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ResourceResponse(InputStream inputStream, String mimeType)
Constructs a resource response provided by the input stream.
| |||||||||||
ResourceResponse(InputStream inputStream, String mimeType, String charset)
Constructs a resource response provided by the input stream.
| |||||||||||
ResourceResponse(DataProvider dataProvider, String mimeType)
Constructs a resource response provided by the data provider.
| |||||||||||
ResourceResponse(DataProvider dataProvider, String mimeType, String charset)
Constructs a resource response provided by the data provider.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static ResourceResponse |
skipResource()
Constructs a resource response that skips resource loading.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a resource response provided by the input stream.
Note: The MIME type should not include character encoding. For example a single
value like the "text/html; charset=utf-8"
is not supported, use just "text/html"
as a mime type. This method defaults to "utf-8" charset, if you wish to use
different charset, use ResourceResponse(InputStream, String, String)
instead.
inputStream | The input stream with the resource data. |
---|---|
mimeType | The MIME type of the resource, for example "text/html" .
|
Constructs a resource response provided by the input stream.
Note: The MIME type should not include character encoding. For example a single
value like the "text/html; charset=utf-8"
is not supported, use just "text/html"
as a mime type and specify the charset via ResourceResponse(DataProvider, String, String)
.
Use ResourceResponse(InputStream, String)
for content that has no character
encoding (such as image resources).
inputStream | The input stream with the resource data. |
---|---|
mimeType | The MIME type of the resource, for example "text/html" . |
charset | The character encoding of the resource, for example "utf-8" .
|
Constructs a resource response provided by the data provider.
Note: The MIME type should not include character encoding. For example a single
value like the "text/html; charset=utf-8"
is not supported, use just "text/html"
as a mime type. This method defaults to "utf-8" charset, if you wish to use
different charset, use ResourceResponse(DataProvider, String, String)
instead.
dataProvider | The data provider with the resource data. |
---|---|
mimeType | The MIME type of the resource, for example "text/html" .
|
Constructs a resource response provided by the data provider.
Note: The MIME type should not include character encoding. For example a single
value like the "text/html; charset=utf-8"
is not supported, use just "text/html"
as a mime type and specify the charset via ResourceResponse(DataProvider, String, String)
.
Use ResourceResponse(DataProvider, String)
for content that has no character
encoding (such as image resources).
dataProvider | The data provider with the resource data. |
---|---|
mimeType | The MIME type of the resource, for example "text/html" . |
charset | The character encoding of the resource, for example "utf-8" .
|
Constructs a resource response that skips resource loading.