Class HttpFileObject<FS extends HttpFileSystem>
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileObject<FS>
org.apache.commons.vfs2.provider.http.HttpFileObject<FS>
- Type Parameters:
- FS- An- HttpFileSystemsubclass
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Comparable<FileObject>,- Iterable<FileObject>,- FileObject
Deprecated.
A file object backed by Apache Commons HttpClient.
 
TODO - status codes.
- 
Field SummaryFields inherited from class org.apache.commons.vfs2.provider.AbstractFileObjectDEFAULT_BUFFER_SIZEFields inherited from interface org.apache.commons.vfs2.FileObjectEMPTY_ARRAY
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHttpFileObject(AbstractFileName fileName, FS fileSystem) Deprecated.Constructs a new instance.protectedHttpFileObject(AbstractFileName fileName, FS fileSystem, HttpFileSystemConfigBuilder builder) Deprecated.Constructs a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voiddoDetach()Deprecated.Detaches this file object from its file resource.protected longDeprecated.Returns the size of the file content (in bytes).protected InputStreamdoGetInputStream(int bufferSize) Deprecated.Creates an input stream to read the file content from.protected longDeprecated.Returns the last modified time of this file.protected RandomAccessContentDeprecated.Creates access to the file for random i/o.protected FileTypeDeprecated.Determines the type of this file.protected booleanDeprecated.Determines if this file can be written to.protected String[]Deprecated.Throws UnsupportedOperationException.protected StringencodePath(String unescaped) Deprecated.Encodes the given path.protected FileContentInfoFactoryDeprecated.Gets a new FileContentInfoFactory.protected booleanDeprecated.Gets whether to follow redirects.protected StringDeprecated.Gets the URL charset name.protected StringDeprecated.Gets the user agent.protected voidsetupMethod(org.apache.commons.httpclient.HttpMethod method) Deprecated.Prepares a HttpMethod object.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObjectcanRenameTo, childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doAttach, doCreateFileContent, doCreateFolder, doDelete, doGetAttributes, doGetCertificates, doGetInputStream, doGetOutputStream, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doIsSymbolicLink, doListChildrenResolved, doRemoveAttribute, doRename, doSetAttribute, 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, toStringMethods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FileObjectgetPath, getURIMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
HttpFileObjectDeprecated.Constructs a new instance.- Parameters:
- fileName- the file name.
- fileSystem- the file system.
 
- 
HttpFileObjectprotected HttpFileObject(AbstractFileName fileName, FS fileSystem, HttpFileSystemConfigBuilder builder) Deprecated.Constructs a new instance.- Parameters:
- fileName- the file name.
- fileSystem- the file system.
- builder- Configuration options for HTTP.
 
 
- 
- 
Method Details- 
doDetachDeprecated.Detaches this file object from its file resource.- Overrides:
- doDetachin class- AbstractFileObject<FS extends HttpFileSystem>
- Throws:
- Exception- if an error occurs.
 
- 
doGetContentSizeDeprecated.Returns the size of the file content (in bytes).- Specified by:
- doGetContentSizein class- AbstractFileObject<FS extends HttpFileSystem>
- Returns:
- The size of the file in bytes.
- Throws:
- Exception- if an error occurs.
 
- 
doGetInputStreamDeprecated.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. - Overrides:
- doGetInputStreamin class- AbstractFileObject<FS extends HttpFileSystem>
- Parameters:
- bufferSize- Buffer size hint.
- Returns:
- An InputStream to read the file content.
- Throws:
- Exception- if an error occurs.
 
- 
doGetLastModifiedTimeDeprecated.Returns the last modified time of this file.This implementation throws an exception. - Overrides:
- doGetLastModifiedTimein class- AbstractFileObject<FS extends HttpFileSystem>
- Returns:
- The last modification time.
- Throws:
- Exception- if an error occurs.
 
- 
doGetRandomAccessContentDeprecated.Description copied from class:AbstractFileObjectCreates 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:
- doGetRandomAccessContentin class- AbstractFileObject<FS extends HttpFileSystem>
- Parameters:
- mode- The mode to access the file.
- Returns:
- The RandomAccessContext.
- Throws:
- Exception- if an error occurs.
 
- 
doGetTypeDeprecated.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:
- doGetTypein class- AbstractFileObject<FS extends HttpFileSystem>
- Returns:
- the type of the file.
- Throws:
- Exception- if an error occurs.
 
- 
doIsWriteableDeprecated.Description copied from class:AbstractFileObjectDetermines if this file can be written to. Is only called ifAbstractFileObject.doGetType()does not returnFileType.IMAGINARY.This implementation always returns true. - Overrides:
- doIsWriteablein class- AbstractFileObject<FS extends HttpFileSystem>
- Returns:
- true if the file is writable.
- Throws:
- Exception- if an error occurs.
 
- 
doListChildrenDeprecated.Throws UnsupportedOperationException.- Specified by:
- doListChildrenin class- AbstractFileObject<FS extends HttpFileSystem>
- Returns:
- a possible empty String array if the file is a directory or null or an exception if the file is not a directory or can't be read.
- Throws:
- UnsupportedOperationException- always thrown.
- Exception- if an error occurs.
 
- 
encodePathDeprecated.Encodes the given path.- Parameters:
- unescaped- An unescaped path.
- Returns:
- the encoded path.
- Throws:
- org.apache.commons.httpclient.URIException- if the default protocol charset is not supported
 
- 
getFileContentInfoFactoryDeprecated.Gets a new FileContentInfoFactory.- Overrides:
- getFileContentInfoFactoryin class- AbstractFileObject<FS extends HttpFileSystem>
- Returns:
- a new FileContentInfoFactory.
 
- 
getFollowRedirectDeprecated.Gets whether to follow redirects.- Returns:
- whether to follow redirects.
 
- 
getUrlCharsetDeprecated.Gets the URL charset name.- Returns:
- the URL charset name.
 
- 
getUserAgentDeprecated.Gets the user agent.- Returns:
- the user agent.
 
- 
setupMethodprotected void setupMethod(org.apache.commons.httpclient.HttpMethod method) throws FileSystemException, org.apache.commons.httpclient.URIException Deprecated.Prepares a HttpMethod object.- Parameters:
- method- The object which gets prepared to access the file object.
- Throws:
- FileSystemException- if an error occurs.
- org.apache.commons.httpclient.URIException- if path cannot be represented.
- Since:
- 2.0 (was package)
 
 
- 
org.apache.commons.vfs2.provider.http5.