com.groupdocs.metadata.options

Class PreviewOptions



  • public class PreviewOptions
    extends Object

    Provides options to sets requirements and stream delegates for preview generation.

    • Constructor Detail

      • PreviewOptions

        public PreviewOptions(ICreatePageStream createPageStream)

        Initializes a new instance of the PreviewOptions class causing the output stream to be closed.

        Parameters:
        createPageStream - Creates a stream for a specific page preview.
      • PreviewOptions

        public PreviewOptions(ICreatePageStream createPageStream,
                              IReleasePageStream releasePageStream)

        Initializes a new instance of PreviewOptions class causing the output stream to be returned to the client for further use.

        Parameters:
        createPageStream - Creates a stream for a specific page preview
        releasePageStream - Notifies that the page preview generation is done and gets the output stream.
    • Method Detail

      • getCacheFolder

        public final String getCacheFolder()

        Gets the cache folder. By default the cache folder is set to user's local temp directory.

        Returns:
        The cache folder.
      • setCacheFolder

        public final void setCacheFolder(String value)

        Sets the cache folder. By default the cache folder is set to user's local temp directory.

        Parameters:
        value - The cache folder.
      • getMaxDiskSpaceForCache

        public final int getMaxDiskSpaceForCache()

        Gets the maximum available disk space for cache in bytes. The default value is 1073741824.

        Returns:
        The maximum available disk space for cache in bytes.
      • setMaxDiskSpaceForCache

        public final void setMaxDiskSpaceForCache(int value)

        Sets the maximum available disk space for cache in bytes. The default value is 1073741824.

        Parameters:
        value - The maximum available disk space for cache in bytes.
      • getMaxMemoryForCache

        public final int getMaxMemoryForCache()

        Gets the maximum available memory for cache in memory in bytes. The default value is 1073741824.

        Returns:
        The maximum available memory for cache in memory in bytes.
      • setMaxMemoryForCache

        public final void setMaxMemoryForCache(int value)

        Sets the maximum available memory for cache in memory in bytes. The default value is 1073741824.

        Parameters:
        value - The maximum available memory for cache in memory in bytes.
      • getWidth

        public final int getWidth()

        Gets the page preview width.

        Returns:
        The page preview width.
      • setWidth

        public final void setWidth(int value)

        Sets the page preview width.

        Parameters:
        value - The page preview width.
      • getHeight

        public final int getHeight()

        Gets the page preview height.

        Returns:
        The page preview height.
      • setHeight

        public final void setHeight(int value)

        Sets the page preview height.

        Parameters:
        value - The page preview height.
      • getPageNumbers

        public final int[] getPageNumbers()

        Gets an array of page numbers to generate previews.

        Returns:
        An array of page numbers to generate previews.
      • setPageNumbers

        public final void setPageNumbers(int[] value)

        Sets an array of page numbers to generate previews.

        Parameters:
        value - An array of page numbers to generate previews.
      • getPreviewFormat

        public final PreviewOptions.PreviewFormats getPreviewFormat()

        Gets the preview image format.

        Returns:
        The preview image format.
      • setPreviewFormat

        public final void setPreviewFormat(PreviewOptions.PreviewFormats value)

        Sets the preview image format.

        Parameters:
        value - The preview image format.
      • getCreatePageStream

        public final ICreatePageStream getCreatePageStream()

        Gets an instance of the page stream creation delegate.

        Returns:
        An instance of the page stream creation delegate.
      • setCreatePageStream

        public final void setCreatePageStream(ICreatePageStream value)

        Sets an instance of the page stream creation delegate.

        Parameters:
        value - An instance of the page stream creation delegate.
      • getReleasePageStream

        public final IReleasePageStream getReleasePageStream()

        Gets an instance of the page preview completion delegate.

        Returns:
        An instance of the page preview completion delegate.
      • setReleasePageStream

        public final void setReleasePageStream(IReleasePageStream value)

        Sets an instance of the page preview completion delegate.

        Parameters:
        value - An instance of the page preview completion delegate.