FS
- An HttpFileSystem
subclassorg.apache.commons.vfs2.provider.http5
.@Deprecated public class HttpFileObject<FS extends HttpFileSystem> extends AbstractFileObject<FS>
TODO - status codes.
DEFAULT_BUFFER_SIZE
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
HttpFileObject(AbstractFileName fileName,
FS fileSystem)
Deprecated.
Constructs a new instance.
|
protected |
HttpFileObject(AbstractFileName fileName,
FS fileSystem,
HttpFileSystemConfigBuilder builder)
Deprecated.
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doDetach()
Deprecated.
Detaches this file object from its file resource.
|
protected long |
doGetContentSize()
Deprecated.
Returns the size of the file content (in bytes).
|
protected InputStream |
doGetInputStream(int bufferSize)
Deprecated.
Creates an input stream to read the file content from.
|
protected long |
doGetLastModifiedTime()
Deprecated.
Returns the last modified time of this file.
|
protected RandomAccessContent |
doGetRandomAccessContent(RandomAccessMode mode)
Deprecated.
Creates access to the file for random i/o.
|
protected FileType |
doGetType()
Deprecated.
Determines the type of this file.
|
protected boolean |
doIsWriteable()
Deprecated.
Determines if this file can be written to.
|
protected String[] |
doListChildren()
Deprecated.
Throws UnsupportedOperationException.
|
protected String |
encodePath(String unescaped)
Deprecated.
Encodes the given path.
|
protected FileContentInfoFactory |
getFileContentInfoFactory()
Deprecated.
Gets a new FileContentInfoFactory.
|
protected boolean |
getFollowRedirect()
Deprecated.
Gets whether to follow redirects.
|
protected String |
getUrlCharset()
Deprecated.
Gets the URL charset name.
|
protected String |
getUserAgent()
Deprecated.
Gets the user agent.
|
protected void |
setupMethod(org.apache.commons.httpclient.HttpMethod method)
Deprecated.
Prepares a HttpMethod object.
|
canRenameTo, 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, toString
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPath, getURI
forEach, spliterator
protected HttpFileObject(AbstractFileName fileName, FS fileSystem)
fileName
- the file name.fileSystem
- the file system.protected HttpFileObject(AbstractFileName fileName, FS fileSystem, HttpFileSystemConfigBuilder builder)
fileName
- the file name.fileSystem
- the file system.builder
- Configuration options for HTTP.protected void doDetach() throws Exception
doDetach
in class AbstractFileObject<FS extends HttpFileSystem>
Exception
- if an error occurs.protected long doGetContentSize() throws Exception
doGetContentSize
in class AbstractFileObject<FS extends HttpFileSystem>
Exception
- if an error occurs.protected InputStream doGetInputStream(int bufferSize) throws 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<FS extends HttpFileSystem>
bufferSize
- Buffer size hint.Exception
- if an error occurs.protected long doGetLastModifiedTime() throws Exception
This implementation throws an exception.
doGetLastModifiedTime
in class AbstractFileObject<FS extends HttpFileSystem>
Exception
- if an error occurs.protected RandomAccessContent doGetRandomAccessContent(RandomAccessMode mode) throws 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<FS extends HttpFileSystem>
mode
- The mode to access the file.Exception
- if an error occurs.protected FileType doGetType() throws Exception
doGetType
in class AbstractFileObject<FS extends HttpFileSystem>
Exception
- if an error occurs.protected boolean doIsWriteable() throws Exception
AbstractFileObject
AbstractFileObject.doGetType()
does not return
FileType.IMAGINARY
.
This implementation always returns true.
doIsWriteable
in class AbstractFileObject<FS extends HttpFileSystem>
Exception
- if an error occurs.protected String[] doListChildren() throws Exception
doListChildren
in class AbstractFileObject<FS extends HttpFileSystem>
UnsupportedOperationException
- always thrown.Exception
- if an error occurs.protected String encodePath(String unescaped) throws org.apache.commons.httpclient.URIException
unescaped
- An unescaped path.org.apache.commons.httpclient.URIException
- if the default protocol charset is not supportedprotected FileContentInfoFactory getFileContentInfoFactory()
getFileContentInfoFactory
in class AbstractFileObject<FS extends HttpFileSystem>
protected boolean getFollowRedirect()
protected String getUrlCharset()
protected String getUserAgent()
protected void setupMethod(org.apache.commons.httpclient.HttpMethod method) throws FileSystemException, org.apache.commons.httpclient.URIException
method
- The object which gets prepared to access the file object.FileSystemException
- if an error occurs.org.apache.commons.httpclient.URIException
- if path cannot be represented.Copyright © 2002–2025 The Apache Software Foundation. All rights reserved.