public class InboundLocalFileOperationsImpl extends java.lang.Object implements InboundLocalFileOperations
InboundLocalFileOperations| Constructor and Description |
|---|
InboundLocalFileOperationsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(FileEventHandler handler)
Registers an individual event handler.
|
boolean |
isCreateDirectoriesIfRequired()
Returns true if create directories if required flag is set to true
|
void |
setCreateDirectoriesIfRequired(boolean createDirectoriesIfRequired)
Sets the flag to true if directories given are to be created if not present
|
void |
setEventListeners(java.util.List<FileEventHandler> handlers)
Registers a
List of FileEventHandler instances |
void |
setTemporaryFileSuffix(java.lang.String tempFileSuffix)
The temporary file suffix that will be used when the file is being written to the filesystem
|
void |
writeToFile(java.io.File directory,
java.lang.String fileName,
java.io.InputStream in)
The method will write to the file with the specified name in the specified directory
from the given
InputStream. |
public void addEventListener(FileEventHandler handler)
InboundLocalFileOperationsaddEventListener in interface InboundLocalFileOperationspublic void setEventListeners(java.util.List<FileEventHandler> handlers)
InboundLocalFileOperationsList of FileEventHandler instancessetEventListeners in interface InboundLocalFileOperationspublic void setTemporaryFileSuffix(java.lang.String tempFileSuffix)
InboundLocalFileOperationssetTemporaryFileSuffix in interface InboundLocalFileOperationspublic boolean isCreateDirectoriesIfRequired()
public void setCreateDirectoriesIfRequired(boolean createDirectoriesIfRequired)
setCreateDirectoriesIfRequired in interface InboundLocalFileOperationscreateDirectoriesIfRequired - public void writeToFile(java.io.File directory,
java.lang.String fileName,
java.io.InputStream in)
throws java.io.IOException
InboundLocalFileOperationsInputStream. Upon completion of the writing the appropriate
FileEventHandler instance(s) will be notified with the FileOperationType
WRITE and File instance for the created file.writeToFile in interface InboundLocalFileOperationsjava.io.IOException