|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.vfs.provider.AbstractFileObject
org.apache.commons.vfs.provider.http.HttpFileObject
public class HttpFileObject
A file object backed by commons httpclient.
Nested Class Summary | |
---|---|
(package private) static class |
HttpFileObject.HttpInputStream
An InputStream that cleans up the HTTP connection on close. |
Field Summary | |
---|---|
private HttpFileSystem |
fileSystem
|
private org.apache.commons.httpclient.methods.HeadMethod |
method
|
private java.lang.String |
urlCharset
|
Constructor Summary | |
---|---|
protected |
HttpFileObject(FileName name,
HttpFileSystem fileSystem)
|
Method Summary | |
---|---|
protected void |
doDetach()
Detaches this file object from its file resource. |
protected long |
doGetContentSize()
Returns the size of the file content (in bytes). |
protected java.io.InputStream |
doGetInputStream()
Creates an input stream to read the file content from. |
protected long |
doGetLastModifiedTime()
Returns the last modified time of this file. |
protected RandomAccessContent |
doGetRandomAccessContent(RandomAccessMode mode)
Creates access to the file for random i/o. |
protected FileType |
doGetType()
Determines the type of this file. |
protected java.lang.String[] |
doListChildren()
Lists the children of this file. |
protected java.lang.String |
encodePath(java.lang.String decodedPath)
|
protected FileContentInfoFactory |
getFileContentInfoFactory()
create the filecontentinfo implementation |
(package private) org.apache.commons.httpclient.methods.HeadMethod |
getHeadMethod()
|
(package private) void |
setupMethod(org.apache.commons.httpclient.HttpMethod method)
Prepares a Method object. |
Methods 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final HttpFileSystem fileSystem
private final java.lang.String urlCharset
private org.apache.commons.httpclient.methods.HeadMethod method
Constructor Detail |
---|
protected HttpFileObject(FileName name, HttpFileSystem fileSystem)
Method Detail |
---|
protected void doDetach() throws java.lang.Exception
doDetach
in class AbstractFileObject
java.lang.Exception
protected FileType doGetType() throws java.lang.Exception
doGetType
in class AbstractFileObject
java.lang.Exception
protected java.lang.String[] doListChildren() throws java.lang.Exception
doListChildren
in class AbstractFileObject
java.lang.Exception
protected long doGetContentSize() throws java.lang.Exception
doGetContentSize
in class AbstractFileObject
java.lang.Exception
protected long doGetLastModifiedTime() throws java.lang.Exception
doGetLastModifiedTime
in class AbstractFileObject
java.lang.Exception
protected java.io.InputStream doGetInputStream() throws java.lang.Exception
doGetType()
returns FileType.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.
doGetInputStream
in class AbstractFileObject
java.lang.Exception
protected RandomAccessContent doGetRandomAccessContent(RandomAccessMode mode) throws java.lang.Exception
AbstractFileObject
AbstractFileObject.doGetType()
returns FileType.FILE
.
It is guaranteed that there are no open output streams for this file when this method is called.
doGetRandomAccessContent
in class AbstractFileObject
java.lang.Exception
void setupMethod(org.apache.commons.httpclient.HttpMethod method) throws FileSystemException, org.apache.commons.httpclient.URIException
FileSystemException
org.apache.commons.httpclient.URIException
protected java.lang.String encodePath(java.lang.String decodedPath) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
protected FileContentInfoFactory getFileContentInfoFactory()
AbstractFileObject
getFileContentInfoFactory
in class AbstractFileObject
org.apache.commons.httpclient.methods.HeadMethod getHeadMethod()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |