Class WebDavResource
java.lang.Object
org.craftercms.commons.spring.resources.WebDavResource
- All Implemented Interfaces:
RangeAwareResource
,org.springframework.core.io.InputStreamSource
,org.springframework.core.io.Resource
Implementation of
Resource
for WebDAV- Since:
- 3.1.4
- Author:
- joseross
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
org.springframework.core.io.Resource
createRelative
(String relativePath) boolean
exists()
getFile()
getInputStream
(long start, long end) Returns a range of bytes from the resource's content.protected com.github.sardine.DavResource
getURI()
getURL()
boolean
isOpen()
boolean
long
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.io.Resource
isFile, readableChannel
-
Field Details
-
client
protected com.github.sardine.Sardine client -
path
-
-
Constructor Details
-
WebDavResource
-
-
Method Details
-
getInputStream
Description copied from interface:RangeAwareResource
Returns a range of bytes from the resource's content.- Specified by:
getInputStream
in interfaceRangeAwareResource
- Parameters:
start
- the start of the rangeend
- the end of the range- Returns:
- an input stream with the content range
- Throws:
IOException
- if an IO error occurs
-
exists
public boolean exists()- Specified by:
exists
in interfaceorg.springframework.core.io.Resource
-
isReadable
public boolean isReadable()- Specified by:
isReadable
in interfaceorg.springframework.core.io.Resource
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfaceorg.springframework.core.io.Resource
-
getURL
- Specified by:
getURL
in interfaceorg.springframework.core.io.Resource
- Throws:
IOException
-
getURI
- Specified by:
getURI
in interfaceorg.springframework.core.io.Resource
- Throws:
IOException
-
getFile
- Specified by:
getFile
in interfaceorg.springframework.core.io.Resource
- Throws:
IOException
-
contentLength
- Specified by:
contentLength
in interfaceorg.springframework.core.io.Resource
- Throws:
IOException
-
lastModified
- Specified by:
lastModified
in interfaceorg.springframework.core.io.Resource
- Throws:
IOException
-
createRelative
- Specified by:
createRelative
in interfaceorg.springframework.core.io.Resource
- Throws:
IOException
-
getFilename
- Specified by:
getFilename
in interfaceorg.springframework.core.io.Resource
-
getDescription
- Specified by:
getDescription
in interfaceorg.springframework.core.io.Resource
-
getInputStream
- Specified by:
getInputStream
in interfaceorg.springframework.core.io.InputStreamSource
- Throws:
IOException
-
getResource
- Throws:
IOException
-