Class ResourceBasedRemoteFile
java.lang.Object
org.craftercms.commons.file.stores.impl.ResourceBasedRemoteFile
- All Implemented Interfaces:
RemoteFile
Implementation of
RemoteFile that basically is facade to a Spring Resource.- Author:
- avasquez
-
Constructor Summary
ConstructorsConstructorDescriptionResourceBasedRemoteFile(RemotePath path, org.springframework.core.io.Resource resource) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the content length of the file.Returns an input stream to the content of the file.getPath()Returns information about the path of the file in the remote store.org.springframework.core.io.ResourceReturns the remote file as a SpringResource.
-
Constructor Details
-
ResourceBasedRemoteFile
-
-
Method Details
-
getPath
Description copied from interface:RemoteFileReturns information about the path of the file in the remote store.- Specified by:
getPathin interfaceRemoteFile
-
getInputStream
Description copied from interface:RemoteFileReturns an input stream to the content of the file.- Specified by:
getInputStreamin interfaceRemoteFile- Throws:
IOException- if an error occurs while trying to access the file content
-
getContentLength
Description copied from interface:RemoteFileReturns the content length of the file.- Specified by:
getContentLengthin interfaceRemoteFile- Throws:
IOException- if an error occurs while trying to access the file
-
toResource
Description copied from interface:RemoteFileReturns the remote file as a SpringResource.- Specified by:
toResourcein interfaceRemoteFile- Throws:
IOException- if the file can't be resolved successfully as a resource
-