@FunctionalInterface public interface ReleaseResourceStream
The ReleaseResourceStream interface represents a functional interface that declares a method to release a stream
that was previously instantiated by the corresponding method in the CreateResourceStream interface. Implementations
of this interface should provide the necessary functionality to release any resources associated with the stream.
Example usage:
ReleaseResourceStream releaseResourceStream = ((pageNumber, resource, resourceStream) -> {
// Custom implementation to release any resources associated with the resource stream
};
HtmlViewOptions htmlViewOptions = HtmlViewOptions.forExternalResources(createPageStream, createResourceStream, releaseResourceStream);
// Use htmlViewOptions in Viewer
HtmlViewOptions| Modifier and Type | Method and Description |
|---|---|
void |
invoke(int pageNumber,
Resource resource,
OutputStream resourceStream)
Releases the stream created by the method associated with the
CreateResourceStream interface. |
void invoke(int pageNumber,
Resource resource,
OutputStream resourceStream)
Releases the stream created by the method associated with the CreateResourceStream interface.
pageNumber - The number of the page.resource - The resource associated with the stream.resourceStream - The stream to be released.Copyright © 2025. All rights reserved.