PreviewOptions

Inheritance: java.lang.Object

public class PreviewOptions

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

Constructors

Constructor Description
PreviewOptions(ICreatePageStream createPageStream) Initializes a new instance of the PreviewOptions class causing the output stream to be closed.
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.

Methods

Method Description
getCacheFolder() Gets the cache folder.
setCacheFolder(String value) Sets the cache folder.
getMaxDiskSpaceForCache() Gets the maximum available disk space for cache in bytes.
setMaxDiskSpaceForCache(int value) Sets the maximum available disk space for cache in bytes.
getMaxMemoryForCache() Gets the maximum available memory for cache in memory in bytes.
setMaxMemoryForCache(int value) Sets the maximum available memory for cache in memory in bytes.
getWidth() Gets the page preview width.
setWidth(int value) Sets the page preview width.
getHeight() Gets the page preview height.
setHeight(int value) Sets the page preview height.
getPageNumbers() Gets an array of page numbers to generate previews.
setPageNumbers(int[] value) Sets an array of page numbers to generate previews.
getPreviewFormat() Gets the preview image format.
setPreviewFormat(PreviewFormats value) Sets the preview image format.
getCreatePageStream() Gets an instance of the page stream creation delegate.
setCreatePageStream(ICreatePageStream value) Sets an instance of the page stream creation delegate.
getReleasePageStream() Gets an instance of the page preview completion delegate.
setReleasePageStream(IReleasePageStream value) Sets an instance of the page preview completion delegate.

PreviewOptions(ICreatePageStream createPageStream)

public PreviewOptions(ICreatePageStream createPageStream)

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

Parameters:

Parameter Type Description
createPageStream ICreatePageStream Creates a stream for a specific page preview.

PreviewOptions(ICreatePageStream createPageStream, IReleasePageStream releasePageStream)

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:

Parameter Type Description
createPageStream ICreatePageStream Creates a stream for a specific page preview
releasePageStream IReleasePageStream Notifies that the page preview generation is done and gets the output stream.

getCacheFolder()

public final String getCacheFolder()

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

Returns: java.lang.String - The cache folder.

setCacheFolder(String value)

public final void setCacheFolder(String value)

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

Parameters:

Parameter Type Description
value java.lang.String The cache folder.

getMaxDiskSpaceForCache()

public final int getMaxDiskSpaceForCache()

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

Returns: int - The maximum available disk space for cache in bytes.

setMaxDiskSpaceForCache(int value)

public final void setMaxDiskSpaceForCache(int value)

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

Parameters:

Parameter Type Description
value int 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: int - The maximum available memory for cache in memory in bytes.

setMaxMemoryForCache(int value)

public final void setMaxMemoryForCache(int value)

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

Parameters:

Parameter Type Description
value int The maximum available memory for cache in memory in bytes.

getWidth()

public final int getWidth()

Gets the page preview width.

Returns: int - The page preview width.

setWidth(int value)

public final void setWidth(int value)

Sets the page preview width.

Parameters:

Parameter Type Description
value int The page preview width.

getHeight()

public final int getHeight()

Gets the page preview height.

Returns: int - The page preview height.

setHeight(int value)

public final void setHeight(int value)

Sets the page preview height.

Parameters:

Parameter Type Description
value int The page preview height.

getPageNumbers()

public final int[] getPageNumbers()

Gets an array of page numbers to generate previews.

Returns: int[] - An array of page numbers to generate previews.

setPageNumbers(int[] value)

public final void setPageNumbers(int[] value)

Sets an array of page numbers to generate previews.

Parameters:

Parameter Type Description
value int[] An array of page numbers to generate previews.

getPreviewFormat()

public final PreviewFormats getPreviewFormat()

Gets the preview image format.

Returns: PreviewFormats - The preview image format.

setPreviewFormat(PreviewFormats value)

public final void setPreviewFormat(PreviewFormats value)

Sets the preview image format.

Parameters:

Parameter Type Description
value PreviewFormats The preview image format.

getCreatePageStream()

public final ICreatePageStream getCreatePageStream()

Gets an instance of the page stream creation delegate.

Returns: ICreatePageStream - An instance of the page stream creation delegate.

setCreatePageStream(ICreatePageStream value)

public final void setCreatePageStream(ICreatePageStream value)

Sets an instance of the page stream creation delegate.

Parameters:

Parameter Type Description
value ICreatePageStream An instance of the page stream creation delegate.

getReleasePageStream()

public final IReleasePageStream getReleasePageStream()

Gets an instance of the page preview completion delegate.

Returns: IReleasePageStream - An instance of the page preview completion delegate.

setReleasePageStream(IReleasePageStream value)

public final void setReleasePageStream(IReleasePageStream value)

Sets an instance of the page preview completion delegate.

Parameters:

Parameter Type Description
value IReleasePageStream An instance of the page preview completion delegate.