com.groupdocs.viewer.handlers.cache
Interface CacheDataHandler

All Known Implementing Classes:
HtmlCacheDataHandler, ImageCacheDataHandler

public interface CacheDataHandler

Author:
Alex Bobkov

Method Summary
 OutputStream getHtmlResourceSaveStream(GroupDocsFileDescription fileDescription, Integer page, String resourceName)
          Get output stream for saving temp HTML resource file
 InputStream getHtmlResourceStream(GroupDocsFileDescription fileDescription, Integer page, String resourceName)
          Get input stream of temp HTML resource file
 OutputStream getHtmlSaveStream(GroupDocsFileDescription fileDescription, Integer page)
          Get output stream for saving temp HTML file
 InputStream getHtmlStream(GroupDocsFileDescription fileDescription, Integer page)
          Get input stream of temp HTML file
 OutputStream getImageSaveStream(GroupDocsFileDescription fileDescription, int page, int width)
          Get output stream for saving temp image file
 InputStream getImageStream(GroupDocsFileDescription fileDescription, int page, int width)
          Get input stream of temp image file
 String getJsContent(GroupDocsFileDescription fileDescription)
          Get content of temp.js file
 OutputStream getPdfSaveStream(GroupDocsFileDescription fileDescription)
          Get output stream for saving temp pdf file
 InputStream getPdfStream(GroupDocsFileDescription fileDescription)
          Get input stream of temp pdf file
 boolean htmlExists(GroupDocsFileDescription fileDescription, Integer page)
          Check if temp HTML file exists
 boolean htmlResourceExists(GroupDocsFileDescription fileDescription, Integer page, String resourceName)
          Check if temp HTML resource file exists
 boolean imageExists(GroupDocsFileDescription fileDescription, int page, int width)
          Check if temp image file exists
 boolean jsExists(GroupDocsFileDescription fileDescription)
          Check if temp.js file is exists
 boolean pdfExists(GroupDocsFileDescription fileDescription)
          Check if temp pdf file exists
 void saveJsContent(String content, GroupDocsFileDescription fileDescription)
          Save content
 

Method Detail

imageExists

boolean imageExists(GroupDocsFileDescription fileDescription,
                    int page,
                    int width)
                    throws Exception
Check if temp image file exists

Parameters:
fileDescription - file description object
page - page number
width - image width
Returns:
true if temp file already exists
Throws:
Exception

getImageStream

InputStream getImageStream(GroupDocsFileDescription fileDescription,
                           int page,
                           int width)
                           throws Exception
Get input stream of temp image file

Parameters:
fileDescription - file description object
page - page number
width - image width
Returns:
stream image input steam
Throws:
Exception

getImageSaveStream

OutputStream getImageSaveStream(GroupDocsFileDescription fileDescription,
                                int page,
                                int width)
                                throws Exception
Get output stream for saving temp image file

Parameters:
fileDescription - file description object
page - page number
width - image width
Returns:
stream output stream to where image will be saved
Throws:
Exception

pdfExists

boolean pdfExists(GroupDocsFileDescription fileDescription)
                  throws Exception
Check if temp pdf file exists

Parameters:
fileDescription - file description object
Returns:
true if file exists
Throws:
Exception

getPdfStream

InputStream getPdfStream(GroupDocsFileDescription fileDescription)
                         throws Exception
Get input stream of temp pdf file

Parameters:
fileDescription - file description object
Returns:
stream pdf input stream
Throws:
Exception

getPdfSaveStream

OutputStream getPdfSaveStream(GroupDocsFileDescription fileDescription)
                              throws Exception
Get output stream for saving temp pdf file

Parameters:
fileDescription - file description object
Returns:
stream output stream to where pdf file will be saved
Throws:
Exception

jsExists

boolean jsExists(GroupDocsFileDescription fileDescription)
                 throws Exception
Check if temp.js file is exists

Parameters:
fileDescription - file description object
Returns:
true if temp file exists
Throws:
Exception

getJsContent

String getJsContent(GroupDocsFileDescription fileDescription)
                    throws Exception
Get content of temp.js file

Parameters:
fileDescription - file description object
Returns:
content of temp.js file
Throws:
Exception

saveJsContent

void saveJsContent(String content,
                   GroupDocsFileDescription fileDescription)
                   throws Exception
Save content

Parameters:
content - content of temp.js file
fileDescription - file description object
Throws:
Exception

htmlExists

boolean htmlExists(GroupDocsFileDescription fileDescription,
                   Integer page)
                   throws Exception
Check if temp HTML file exists

Parameters:
fileDescription - file description object
page - page number
Returns:
true if file exists
Throws:
Exception

getHtmlStream

InputStream getHtmlStream(GroupDocsFileDescription fileDescription,
                          Integer page)
                          throws Exception
Get input stream of temp HTML file

Parameters:
fileDescription - file description object
page - page number
Returns:
stream
Throws:
Exception

getHtmlSaveStream

OutputStream getHtmlSaveStream(GroupDocsFileDescription fileDescription,
                               Integer page)
                               throws Exception
Get output stream for saving temp HTML file

Parameters:
fileDescription - file description object
page - page number
Returns:
stream
Throws:
Exception

htmlResourceExists

boolean htmlResourceExists(GroupDocsFileDescription fileDescription,
                           Integer page,
                           String resourceName)
                           throws Exception
Check if temp HTML resource file exists

Parameters:
fileDescription - file description object
page - page number
resourceName -
Returns:
true if file exists
Throws:
Exception

getHtmlResourceStream

InputStream getHtmlResourceStream(GroupDocsFileDescription fileDescription,
                                  Integer page,
                                  String resourceName)
                                  throws Exception
Get input stream of temp HTML resource file

Parameters:
fileDescription - file description object
page - page number
resourceName -
Returns:
stream
Throws:
Exception

getHtmlResourceSaveStream

OutputStream getHtmlResourceSaveStream(GroupDocsFileDescription fileDescription,
                                       Integer page,
                                       String resourceName)
                                       throws Exception
Get output stream for saving temp HTML resource file

Parameters:
fileDescription - file description object
page - page number
resourceName -
Returns:
stream
Throws:
Exception


Copyright © 2015. All rights reserved.