public class PreviewOptions extends Object
Provides options to sets requirements and stream delegates for preview generation.
Modifier and Type | Class and Description |
---|---|
static class |
PreviewOptions.PreviewFormats
Represents supported preview formats.
|
Constructor and 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. |
Modifier and Type | Method and Description |
---|---|
String |
getCacheFolder()
Gets the cache folder.
|
ICreatePageStream |
getCreatePageStream()
Gets an instance of the page stream creation delegate.
|
int |
getHeight()
Gets the page preview height.
|
int |
getMaxDiskSpaceForCache()
Gets the maximum available disk space for cache in bytes.
|
int |
getMaxMemoryForCache()
Gets the maximum available memory for cache in memory in bytes.
|
int[] |
getPageNumbers()
Gets an array of page numbers to generate previews.
|
PreviewOptions.PreviewFormats |
getPreviewFormat()
Gets the preview image format.
|
IReleasePageStream |
getReleasePageStream()
Gets an instance of the page preview completion delegate.
|
int |
getWidth()
Gets the page preview width.
|
void |
setCacheFolder(String value)
Sets the cache folder.
|
void |
setCreatePageStream(ICreatePageStream value)
Sets an instance of the page stream creation delegate.
|
void |
setHeight(int value)
Sets the page preview height.
|
void |
setMaxDiskSpaceForCache(int value)
Sets the maximum available disk space for cache in bytes.
|
void |
setMaxMemoryForCache(int value)
Sets the maximum available memory for cache in memory in bytes.
|
void |
setPageNumbers(int[] value)
Sets an array of page numbers to generate previews.
|
void |
setPreviewFormat(PreviewOptions.PreviewFormats value)
Sets the preview image format.
|
void |
setReleasePageStream(IReleasePageStream value)
Sets an instance of the page preview completion delegate.
|
void |
setWidth(int value)
Sets the page preview width.
|
public PreviewOptions(ICreatePageStream createPageStream)
Initializes a new instance of the PreviewOptions
class causing the output stream to be closed.
createPageStream
- Creates a stream for a specific page preview.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.
createPageStream
- Creates a stream for a specific page previewreleasePageStream
- Notifies that the page preview generation is done and gets the output stream.public final String getCacheFolder()
Gets the cache folder. By default the cache folder is set to user's local temp directory.
public final void setCacheFolder(String value)
Sets the cache folder. By default the cache folder is set to user's local temp directory.
value
- The cache folder.public final int getMaxDiskSpaceForCache()
Gets the maximum available disk space for cache in bytes. The default value is 1073741824.
public final void setMaxDiskSpaceForCache(int value)
Sets the maximum available disk space for cache in bytes. The default value is 1073741824.
value
- The maximum available disk space for cache in bytes.public final int getMaxMemoryForCache()
Gets the maximum available memory for cache in memory in bytes. The default value is 1073741824.
public final void setMaxMemoryForCache(int value)
Sets the maximum available memory for cache in memory in bytes. The default value is 1073741824.
value
- The maximum available memory for cache in memory in bytes.public final int getWidth()
Gets the page preview width.
public final void setWidth(int value)
Sets the page preview width.
value
- The page preview width.public final int getHeight()
Gets the page preview height.
public final void setHeight(int value)
Sets the page preview height.
value
- The page preview height.public final int[] getPageNumbers()
Gets an array of page numbers to generate previews.
public final void setPageNumbers(int[] value)
Sets an array of page numbers to generate previews.
value
- An array of page numbers to generate previews.public final PreviewOptions.PreviewFormats getPreviewFormat()
Gets the preview image format.
public final void setPreviewFormat(PreviewOptions.PreviewFormats value)
Sets the preview image format.
value
- The preview image format.public final ICreatePageStream getCreatePageStream()
Gets an instance of the page stream creation delegate.
public final void setCreatePageStream(ICreatePageStream value)
Sets an instance of the page stream creation delegate.
value
- An instance of the page stream creation delegate.public final IReleasePageStream getReleasePageStream()
Gets an instance of the page preview completion delegate.
public final void setReleasePageStream(IReleasePageStream value)
Sets an instance of the page preview completion delegate.
value
- An instance of the page preview completion delegate.