public class FileWebdavResource extends WebdavResource
Modifier and Type | Field and Description |
---|---|
java.io.File |
resourceFile |
static java.lang.String |
REVISION |
possibleFile, uri
Constructor and Description |
---|
FileWebdavResource(java.lang.String uri,
WebdavContext ctxt) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<WebdavResource> |
getChildren(WebdavContext ctxt)
Return all the Children of the resource.
|
long |
getContentLength(WebdavContext ctxt)
Return the size of the resource or 0 if there is no content
|
java.lang.String |
getContentType(WebdavContext ctxt)
This method have to return the Content Type of the resource
with the Content Encoding ie "text/html; charset=UTF-8"
It is the media type defined in section 3.7 of [RFC2068]
If no content type then return ""
|
long |
getCreationDate(WebdavContext ctxt)
Return long representing the Creation of the resource
It contains a timestamp of the moment when the resource
was created (i.e., the moment it had non-null state).
|
long |
getLastModified(WebdavContext ctxt)
Return long representing the LastModified of the resource
Note that the last-modified date on a resource may reflect
changes in any part of the state of the resource, not necessarily
just a change to the response to the GET method.
|
java.io.InputStream |
getResourceStream(WebdavContext ctxt)
This method have to return an InputStream on the resource.
|
boolean |
isExisting(WebdavContext ctxt)
Check if the resource exists in the UserFileSystem
This method is abstract and must be implemented by the UserFileSystem.
|
boolean |
isFile(WebdavContext ctxt)
This method will check if the resource is a File or a Folder.
|
boolean |
isFolder(WebdavContext ctxt)
This method will check if the resource is a File or a Folder.
|
boolean |
isHidden(WebdavContext ctxt)
This method will return true if the resource isHidden.
|
boolean |
setResourceStream(java.io.InputStream in,
WebdavContext ctxt)
This method have to return an InputStream on the resource.
|
checkUnlockAccess, compareTo, equals, getContentLanguage, getDescendantLocks, getETag, getLastAccessed, getLocks, getName, getParent, getPath, hasExclusiveLockAccess, hasLockAccess, isPossibleFile, isReadable, isWritable, putLock, putLocks, setPath, setPossibleContent, toString
public static final java.lang.String REVISION
public java.io.File resourceFile
public FileWebdavResource(java.lang.String uri, WebdavContext ctxt)
public java.util.Collection<WebdavResource> getChildren(WebdavContext ctxt)
WebdavResource
getChildren
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.getChildren(WebdavContext)
public boolean isExisting(WebdavContext ctxt)
WebdavResource
isExisting
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.isExisting(WebdavContext)
public boolean isFile(WebdavContext ctxt)
WebdavResource
isFile
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.isFile(WebdavContext)
public boolean isFolder(WebdavContext ctxt)
WebdavResource
isFolder
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.isFolder(WebdavContext)
public boolean isHidden(WebdavContext ctxt)
WebdavResource
isHidden
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.isHidden(WebdavContext)
public long getContentLength(WebdavContext ctxt)
WebdavResource
getContentLength
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.getContentLength(WebdavContext)
public long getCreationDate(WebdavContext ctxt)
WebdavResource
getCreationDate
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.getCreationDate(WebdavContext)
public long getLastModified(WebdavContext ctxt)
WebdavResource
getLastModified
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.getLastModified(WebdavContext)
public java.lang.String getContentType(WebdavContext ctxt)
WebdavResource
getContentType
in class WebdavResource
ctxt
- the Webdav ContextWebdavResource.getContentType(WebdavContext)
public java.io.InputStream getResourceStream(WebdavContext ctxt) throws java.io.IOException
WebdavResource
getResourceStream
in class WebdavResource
ctxt
- the Webdav Contextjava.io.IOException
WebdavResource.getResourceStream(WebdavContext)
public boolean setResourceStream(java.io.InputStream in, WebdavContext ctxt) throws java.io.IOException
WebdavResource
setResourceStream
in class WebdavResource
in
- the Request InputStreamctxt
- the Webdav Contextjava.io.IOException
WebdavResource.setResourceStream(InputStream, WebdavContext)
Copyright © 2001-2010 Jalios SA. All Rights Reserved.