public class ResourceBasedRemoteFile extends Object implements RemoteFile
RemoteFile that basically is facade to a Spring Resource.| Constructor and Description |
|---|
ResourceBasedRemoteFile(RemotePath path,
org.springframework.core.io.Resource resource) |
| Modifier and Type | Method and Description |
|---|---|
long |
getContentLength()
Returns the content length of the file.
|
InputStream |
getInputStream()
Returns an input stream to the content of the file.
|
RemotePath |
getPath()
Returns information about the path of the file in the remote store.
|
org.springframework.core.io.Resource |
toResource()
Returns the remote file as a Spring
Resource. |
public ResourceBasedRemoteFile(RemotePath path, org.springframework.core.io.Resource resource)
public RemotePath getPath()
RemoteFilegetPath in interface RemoteFilepublic InputStream getInputStream() throws IOException
RemoteFilegetInputStream in interface RemoteFileIOException - if an error occurs while trying to access the file contentpublic long getContentLength()
throws IOException
RemoteFilegetContentLength in interface RemoteFileIOException - if an error occurs while trying to access the filepublic org.springframework.core.io.Resource toResource()
throws IOException
RemoteFileResource.toResource in interface RemoteFileIOException - if the file can't be resolved successfully as a resourceCopyright © 2021 CrafterCMS. All rights reserved.