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 TypeMethodDescriptionlongorg.springframework.core.io.ResourcecreateRelative(String relativePath) booleanexists()getFile()getInputStream(long start, long end) Returns a range of bytes from the resource's content.protected com.github.sardine.DavResourcegetURI()getURL()booleanisOpen()booleanlongMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.io.Resource
getContentAsByteArray, getContentAsString, isFile, readableChannel
-
Field Details
-
client
protected com.github.sardine.Sardine client -
path
-
-
Constructor Details
-
WebDavResource
-
-
Method Details
-
getInputStream
Description copied from interface:RangeAwareResourceReturns a range of bytes from the resource's content.- Specified by:
getInputStreamin 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:
existsin interfaceorg.springframework.core.io.Resource
-
isReadable
public boolean isReadable()- Specified by:
isReadablein interfaceorg.springframework.core.io.Resource
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceorg.springframework.core.io.Resource
-
getURL
- Specified by:
getURLin interfaceorg.springframework.core.io.Resource- Throws:
IOException
-
getURI
- Specified by:
getURIin interfaceorg.springframework.core.io.Resource- Throws:
IOException
-
getFile
- Specified by:
getFilein interfaceorg.springframework.core.io.Resource- Throws:
IOException
-
contentLength
- Specified by:
contentLengthin interfaceorg.springframework.core.io.Resource- Throws:
IOException
-
lastModified
- Specified by:
lastModifiedin interfaceorg.springframework.core.io.Resource- Throws:
IOException
-
createRelative
- Specified by:
createRelativein interfaceorg.springframework.core.io.Resource- Throws:
IOException
-
getFilename
- Specified by:
getFilenamein interfaceorg.springframework.core.io.Resource
-
getDescription
- Specified by:
getDescriptionin interfaceorg.springframework.core.io.Resource
-
getInputStream
- Specified by:
getInputStreamin interfaceorg.springframework.core.io.InputStreamSource- Throws:
IOException
-
getResource
- Throws:
IOException
-