Class HttpFileObject
java.lang.Object
org.apache.commons.vfs.provider.AbstractFileObject
org.apache.commons.vfs.provider.http.HttpFileObject
- All Implemented Interfaces:
FileObject
A file object backed by commons httpclient.
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doDetach()
Detaches this file object from its file resource.protected long
Returns the size of the file content (in bytes).protected InputStream
Creates an input stream to read the file content from.protected long
Returns the last modified time of this file.protected RandomAccessContent
Creates access to the file for random i/o.protected FileType
Determines the type of this file.protected String[]
Lists the children of this file.protected String
encodePath
(String decodedPath) protected FileContentInfoFactory
create the filecontentinfo implementationMethods inherited from class org.apache.commons.vfs.provider.AbstractFileObject
canRenameTo, childrenChanged, childrenChanged, close, copyFrom, createFile, createFolder, delete, delete, doAttach, doCreateFolder, doDelete, doGetAttributes, doGetCertificates, doGetOutputStream, doIsHidden, doIsReadable, doIsSameFile, doIsWriteable, doListChildrenResolved, doRename, doSetAttribute, doSetLastModifiedTime, endOutput, exists, finalize, findFiles, findFiles, getChild, getChildren, getContent, getFileOperations, getFileSystem, getInputStream, getName, getOutputStream, getOutputStream, getParent, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isHidden, isReadable, isSameFile, isWriteable, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, toString
-
Constructor Details
-
HttpFileObject
-
-
Method Details
-
doDetach
Detaches this file object from its file resource.- Overrides:
doDetach
in classAbstractFileObject
- 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.- Specified by:
doGetType
in classAbstractFileObject
- Throws:
Exception
-
doListChildren
Lists the children of this file.- Specified by:
doListChildren
in classAbstractFileObject
- Throws:
Exception
-
doGetContentSize
Returns the size of the file content (in bytes).- Specified by:
doGetContentSize
in classAbstractFileObject
- Throws:
Exception
-
doGetLastModifiedTime
Returns the last modified time of this file. This implementation throws an exception.- Overrides:
doGetLastModifiedTime
in classAbstractFileObject
- Throws:
Exception
-
doGetInputStream
Creates an input stream to read the file content from. Is only called ifdoGetType()
returnsFileType.FILE
.It is guaranteed that there are no open output streams for this file when this method is called.
The returned stream does not have to be buffered.
- Specified by:
doGetInputStream
in classAbstractFileObject
- Throws:
Exception
-
doGetRandomAccessContent
Description copied from class:AbstractFileObject
Creates access to the file for random i/o. Is only called ifAbstractFileObject.doGetType()
returnsFileType.FILE
.It is guaranteed that there are no open output streams for this file when this method is called.
- Overrides:
doGetRandomAccessContent
in classAbstractFileObject
- Throws:
Exception
-
encodePath
- Throws:
org.apache.commons.httpclient.URIException
-
getFileContentInfoFactory
Description copied from class:AbstractFileObject
create the filecontentinfo implementation- Overrides:
getFileContentInfoFactory
in classAbstractFileObject
-