com.groupdocs.viewer.handlers.input
Class LocalInputDataHandler

java.lang.Object
  extended by com.groupdocs.viewer.handlers.input.InputDataHandler
      extended by com.groupdocs.viewer.handlers.input.LocalInputDataHandler

public class LocalInputDataHandler
extends InputDataHandler

Data source instance

Author:
Alex Bobkov

Constructor Summary
LocalInputDataHandler(String filesPath, String encryptedKey, String uploadPath)
           
 
Method Summary
 InputStream getFile(String guid)
          Get file
 File[] getFileList(String directory)
          Get files list
 FileType getFileType(String guid)
          Get file type
 boolean getImage(String guid, String imageSrc, OutputStream outputStream)
          Get external image (for html and some files with images)
 String saveFile(InputStream inputStream, String fileName, Integer timeToLive)
          Save file
 
Methods inherited from class com.groupdocs.viewer.handlers.input.InputDataHandler
getInputDataHandler, getInstance, setInputDataHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalInputDataHandler

public LocalInputDataHandler(String filesPath,
                             String encryptedKey,
                             String uploadPath)
Method Detail

getFileList

public File[] getFileList(String directory)
Description copied from class: InputDataHandler
Get files list

Specified by:
getFileList in class InputDataHandler
Parameters:
directory - Files location directory
Returns:
Files map, list or array

getFile

public InputStream getFile(String guid)
Description copied from class: InputDataHandler
Get file

Specified by:
getFile in class InputDataHandler
Parameters:
guid - File id or file path
Returns:
InputStream of the file

getImage

public boolean getImage(String guid,
                        String imageSrc,
                        OutputStream outputStream)
Description copied from class: InputDataHandler
Get external image (for html and some files with images)

Overrides:
getImage in class InputDataHandler
Parameters:
guid - file GUID
imageSrc - value of src attribute from img tag in html file
outputStream - stream to write image data
Returns:

getFileType

public FileType getFileType(String guid)
Description copied from class: InputDataHandler
Get file type

Specified by:
getFileType in class InputDataHandler
Parameters:
guid - File id or file path
Returns:
FileType of the file

saveFile

public String saveFile(InputStream inputStream,
                       String fileName,
                       Integer timeToLive)
Description copied from class: InputDataHandler
Save file

Specified by:
saveFile in class InputDataHandler
Returns:


Copyright © 2014. All rights reserved.