Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- configureMethod(HttpMethodBase)
- doCreateFolder()
- doDelete()
- doGetAttributes()
- doGetContentSize()
- doGetLastModifiedTime()
- doGetOutputStream(boolean)
- doGetType()
- doIsWriteable()
- doListChildren()
- doListChildrenResolved()
- doRename(FileObject)
- doSetAttribute(String, Object)
- getFileContentInfoFactory()
- setupMethod(HttpMethod)
Class WebdavFileObject
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileObject<WebdavFileSystem>
org.apache.commons.vfs2.provider.http.HttpFileObject<WebdavFileSystem>
org.apache.commons.vfs2.provider.webdav.WebdavFileObject
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Comparable<FileObject>
,Iterable<FileObject>
,FileObject
A WebDAV file.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.jackrabbit.webdav.property.DavPropertyName
The character set property name.Fields inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
DEFAULT_BUFFER_SIZE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WebdavFileObject
(AbstractFileName fileName, WebdavFileSystem fileSystem) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureMethod
(org.apache.commons.httpclient.HttpMethodBase httpMethod) Configures the given HttpMethodBase.protected void
Creates this file as a folder.protected void
doDelete()
Deletes the file.Returns the properties of the WebDAV resource.protected long
Returns the size of the file content (in bytes).protected long
Returns the last modified time of this file.protected OutputStream
doGetOutputStream
(boolean bAppend) protected FileType
Determines the type of this file.protected boolean
Determines if this file can be written to.protected String[]
Lists the children of the file.protected FileObject[]
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
protected void
setupMethod
(org.apache.commons.httpclient.HttpMethod method) Prepares a Method object.Methods inherited from class org.apache.commons.vfs2.provider.http.HttpFileObject
doDetach, doGetInputStream, doGetRandomAccessContent, encodePath, getFollowRedirect, getUrlCharset, getUserAgent
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
canRenameTo, childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doAttach, doCreateFileContent, doGetCertificates, doGetInputStream, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doIsSymbolicLink, doRemoveAttribute, doSetExecutable, doSetLastModifiedTime, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileOperations, getFileSystem, getInputStream, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, isSymbolicLink, isWriteable, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toString
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.vfs2.FileObject
getPath, getURI
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
Constructor Details
-
Method Details
-
configureMethod
Configures the given HttpMethodBase.- Parameters:
httpMethod
- The HttpMethodBase to configure.
-
doCreateFolder
Creates this file as a folder.- Overrides:
doCreateFolder
in classAbstractFileObject<WebdavFileSystem>
- Throws:
Exception
-
doDelete
Deletes the file.- Overrides:
doDelete
in classAbstractFileObject<WebdavFileSystem>
- Throws:
Exception
-
doGetAttributes
Returns the properties of the WebDAV resource.- Overrides:
doGetAttributes
in classAbstractFileObject<WebdavFileSystem>
- Throws:
Exception
-
doGetContentSize
Returns the size of the file content (in bytes).- Overrides:
doGetContentSize
in classHttpFileObject<WebdavFileSystem>
- Throws:
Exception
-
doGetLastModifiedTime
Returns the last modified time of this file. Is only called ifdoGetType()
does not returnFileType.IMAGINARY
.- Overrides:
doGetLastModifiedTime
in classHttpFileObject<WebdavFileSystem>
- Throws:
Exception
-
doGetOutputStream
- Overrides:
doGetOutputStream
in classAbstractFileObject<WebdavFileSystem>
- Throws:
Exception
-
doGetType
Determines the type of this file. Must not return null. The return value of this method is cached, so the implementation can be expensive.- Overrides:
doGetType
in classHttpFileObject<WebdavFileSystem>
- Throws:
Exception
-
doIsWriteable
Determines if this file can be written to. Is only called ifdoGetType()
does not returnFileType.IMAGINARY
.This implementation always returns true.
- Overrides:
doIsWriteable
in classHttpFileObject<WebdavFileSystem>
- Returns:
- true if the file is writable.
- Throws:
Exception
- if an error occurs.
-
doListChildren
Lists the children of the file.- Overrides:
doListChildren
in classHttpFileObject<WebdavFileSystem>
- Throws:
Exception
-
doListChildrenResolved
Lists the children of the file.- Overrides:
doListChildrenResolved
in classAbstractFileObject<WebdavFileSystem>
- Throws:
Exception
-
doRename
Rename the file.- Overrides:
doRename
in classAbstractFileObject<WebdavFileSystem>
- Throws:
Exception
-
doSetAttribute
Sets an attribute of this file. Is only called ifdoGetType()
does not returnFileType.IMAGINARY
.- Overrides:
doSetAttribute
in classAbstractFileObject<WebdavFileSystem>
- Throws:
Exception
-
getFileContentInfoFactory
- Overrides:
getFileContentInfoFactory
in classHttpFileObject<WebdavFileSystem>
-
setupMethod
protected void setupMethod(org.apache.commons.httpclient.HttpMethod method) throws FileSystemException, org.apache.commons.httpclient.URIException Prepares a Method object.- Overrides:
setupMethod
in classHttpFileObject<WebdavFileSystem>
- Parameters:
method
- the HttpMethod.- Throws:
FileSystemException
- if an error occurs encoding the uri.org.apache.commons.httpclient.URIException
- if the URI is in error.
-