public class WebdavFileObject extends HttpFileObject<WebdavFileSystem>
Modifier and Type | Field and Description |
---|---|
static DavPropertyName |
RESPONSE_CHARSET
The character set property name.
|
Modifier | Constructor and Description |
---|---|
protected |
WebdavFileObject(AbstractFileName name,
WebdavFileSystem fileSystem) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureMethod(org.apache.commons.httpclient.HttpMethodBase httpMethod) |
protected void |
doCreateFolder()
Creates this file as a folder.
|
protected void |
doDelete()
Deletes the file.
|
protected Map<String,Object> |
doGetAttributes()
Returns the properties of the Webdav resource.
|
protected long |
doGetContentSize()
Returns the size of the file content (in bytes).
|
protected long |
doGetLastModifiedTime()
Returns the last modified time of this file.
|
protected OutputStream |
doGetOutputStream(boolean bAppend)
Creates an output stream to write the file content to.
|
protected FileType |
doGetType()
Determines the type of this file.
|
protected boolean |
doIsWriteable()
Determines if this file can be written to.
|
protected String[] |
doListChildren()
Lists the children of the file.
|
protected FileObject[] |
doListChildrenResolved()
Lists the children of the file.
|
protected void |
doRename(FileObject newFile)
Rename the file.
|
protected void |
doSetAttribute(String attrName,
Object value)
Sets an attribute of this file.
|
protected FileContentInfoFactory |
getFileContentInfoFactory()
create the filecontentinfo implementation.
|
protected void |
setupMethod(org.apache.commons.httpclient.HttpMethod method)
Prepares a Method object.
|
doDetach, doGetInputStream, doGetRandomAccessContent, encodePath, getFollowRedirect, getUrlCharset, getUserAgent
canRenameTo, childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doAttach, doCreateFileContent, doGetCertificates, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doRemoveAttribute, doSetExecutable, doSetLastModifiedTime, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileOperations, getFileSystem, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, isWriteable, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toString
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final DavPropertyName RESPONSE_CHARSET
protected WebdavFileObject(AbstractFileName name, WebdavFileSystem fileSystem)
protected void configureMethod(org.apache.commons.httpclient.HttpMethodBase httpMethod)
protected void doCreateFolder() throws Exception
doCreateFolder
in class AbstractFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected void doDelete() throws Exception
doDelete
in class AbstractFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected Map<String,Object> doGetAttributes() throws Exception
doGetAttributes
in class AbstractFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected long doGetContentSize() throws Exception
doGetContentSize
in class HttpFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected long doGetLastModifiedTime() throws Exception
doGetType()
does not return FileType.IMAGINARY
.doGetLastModifiedTime
in class HttpFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected OutputStream doGetOutputStream(boolean bAppend) throws Exception
AbstractFileObject
AbstractFileObject.doIsWriteable()
returns true.
AbstractFileObject.doGetType()
returns FileType.FILE
, or
AbstractFileObject.doGetType()
returns FileType.IMAGINARY
, and the file's
parent exists and is a folder.
The returned stream does not have to be buffered.
This implementation throws an exception.
doGetOutputStream
in class AbstractFileObject<WebdavFileSystem>
bAppend
- true if the file should be appended to, false if it should be overwritten.Exception
- if an error occurs.protected FileType doGetType() throws Exception
doGetType
in class HttpFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected boolean doIsWriteable() throws Exception
doGetType()
does not return FileType.IMAGINARY
.
This implementation always returns true.
doIsWriteable
in class HttpFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected String[] doListChildren() throws Exception
doListChildren
in class HttpFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected FileObject[] doListChildrenResolved() throws Exception
doListChildrenResolved
in class AbstractFileObject<WebdavFileSystem>
Exception
- if an error occurs.protected void doRename(FileObject newFile) throws Exception
doRename
in class AbstractFileObject<WebdavFileSystem>
newFile
- A FileObject with the new file name.Exception
- if an error occurs.protected void doSetAttribute(String attrName, Object value) throws Exception
doGetType()
does not return FileType.IMAGINARY
.doSetAttribute
in class AbstractFileObject<WebdavFileSystem>
attrName
- The attribute name.value
- The value to be associated with the attribute name.Exception
- if an error occurs.protected FileContentInfoFactory getFileContentInfoFactory()
AbstractFileObject
getFileContentInfoFactory
in class HttpFileObject<WebdavFileSystem>
protected void setupMethod(org.apache.commons.httpclient.HttpMethod method) throws FileSystemException, org.apache.commons.httpclient.URIException
setupMethod
in class HttpFileObject<WebdavFileSystem>
method
- the HttpMethod.FileSystemException
- if an error occurs encoding the uri.org.apache.commons.httpclient.URIException
- if the URI is in error.Copyright © 2002–2016. All rights reserved.