ReleasePageStreamFunction

public interface ReleasePageStreamFunction

Functional interface that is used to close output stream that was used by Comparison to save preview image.

More details about its usage can be found in PreviewOptions class or in a documentation.

Example usage:


 PreviewOptions previewOptions = new PreviewOptions(pageNumber -> {
    return new FileOutputStream("/path/page-" + pageNumber + ".png");
 }, (pageNumber, pageStream) -> {
    // do something
    pageStream.close();
 });
 

Methods

Method Description
invoke(int pageNumber, OutputStream pageStream) Function that is called by Comparison to close output stream where page preview image was saved.

invoke(int pageNumber, OutputStream pageStream)

public abstract void invoke(int pageNumber, OutputStream pageStream)

Function that is called by Comparison to close output stream where page preview image was saved.

Parameters:

Parameter Type Description
pageNumber int The number of previewed page.
pageStream java.io.OutputStream The stream to be closed.