Package com.pspdfkit.document.html
Class ResourceResponse
-
- All Implemented Interfaces:
public final class ResourceResponse
Encapsulates resource response. Custom response can be returned in shouldInterceptRequest to override HTML page loading.
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
Modifier and Type Method Description static ResourceResponse
skipResource()
Constructs a resource response that skips resource loading. -
-
Constructor Detail
-
ResourceResponse
ResourceResponse(InputStream inputStream, String mimeType)
Constructs a resource response provided by the input stream.- Parameters:
inputStream
- The input stream with the resource data.mimeType
- The MIME type of the resource, for example"text/html"
.
-
ResourceResponse
ResourceResponse(InputStream inputStream, String mimeType, String charset)
Constructs a resource response provided by the input stream.- Parameters:
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"
.
-
ResourceResponse
ResourceResponse(DataProvider dataProvider, String mimeType)
Constructs a resource response provided by the data provider.- Parameters:
dataProvider
- The data provider with the resource data.mimeType
- The MIME type of the resource, for example"text/html"
.
-
ResourceResponse
ResourceResponse(DataProvider dataProvider, String mimeType, String charset)
Constructs a resource response provided by the data provider.- Parameters:
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"
.
-
-
Method Detail
-
skipResource
@NonNull() static ResourceResponse skipResource()
Constructs a resource response that skips resource loading.
-
-
-
-