public interface ResourceStreamFactory
The ResourceStreamFactory interface provides the necessary methods for creating a resource URL, as well as
instantiating and releasing an output HTML resource stream. Implementations of this interface should provide the
functionality to handle the creation, instantiation, and release of the resource stream and URL.
Example usage:
{@code
ResourceStreamFactory resourceStreamFactory = new ResourceStreamFactory() {HtmlViewOptions| Modifier and Type | Method and Description |
|---|---|
void |
closeResourceStream(int pageNumber,
Resource resource,
OutputStream resourceStream)
Releases the stream created by the
createResourceStream(int, Resource) method
for the specified page number and HTML resource. |
OutputStream |
createResourceStream(int pageNumber,
Resource resource)
Creates the stream used to write output HTML resource data.
|
String |
createResourceUrl(int pageNumber,
Resource resource)
Creates the URL for the specified HTML resource based on the page number and resource type.
|
void closeResourceStream(int pageNumber,
Resource resource,
OutputStream resourceStream)
Releases the stream created by the createResourceStream(int, Resource) method
for the specified page number and HTML resource.
pageNumber - The number of the page that contains the resource.resource - The HTML resource such as font, style, image, or graphics.resourceStream - The OutputStream created by the createResourceStream(int, Resource) method.OutputStream createResourceStream(int pageNumber, Resource resource)
Creates the stream used to write output HTML resource data.
pageNumber - The number of the page.resource - The HTML resource such as font, style, image, or graphics.String createResourceUrl(int pageNumber, Resource resource)
Creates the URL for the specified HTML resource based on the page number and resource type.
pageNumber - The number of the page that contains the resource.resource - The HTML resource such as font, style, image, or graphics.Copyright © 2024. All rights reserved.