public class LocalInputDataHandler extends InputDataHandler
Constructor and Description |
---|
LocalInputDataHandler(String filesPath,
String uploadPath) |
Modifier and Type | Method and Description |
---|---|
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,
String encryptedKey)
Save file
|
public File[] getFileList(String directory)
InputDataHandler
getFileList
in class InputDataHandler
directory
- Files location directorypublic InputStream getFile(String guid)
InputDataHandler
getFile
in class InputDataHandler
guid
- File id or file pathpublic boolean getImage(String guid, String imageSrc, OutputStream outputStream)
InputDataHandler
getImage
in class InputDataHandler
guid
- file GUIDimageSrc
- value of src attribute from img tag in html fileoutputStream
- stream to write image datapublic FileType getFileType(String guid)
InputDataHandler
getFileType
in class InputDataHandler
guid
- File id or file pathpublic String saveFile(InputStream inputStream, String fileName, Integer timeToLive, String encryptedKey)
InputDataHandler
saveFile
in class InputDataHandler
inputStream
- Input stream of object to be saved/uploadedfileName
- file nametimeToLive
- TTL, 0 - unlimitedencryptedKey
- encryption keyCopyright © 2014. All rights reserved.