public class UrlFileObject extends AbstractFileObject<UrlFileSystem>
FileObject
implementation backed by a URL
.
TODO - Implement set lastModified and get/set attribute
TODO - Implement getOutputStream().
DEFAULT_BUFFER_SIZE
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
UrlFileObject(UrlFileSystem fs,
AbstractFileName fileName) |
Modifier and Type | Method and Description |
---|---|
protected URL |
createURL(FileName name) |
protected void |
doAttach()
Attaches this file object to its file resource.
|
protected long |
doGetContentSize()
Returns the size of the file content (in bytes).
|
protected InputStream |
doGetInputStream(int bufferSize)
Creates an input stream to read the file content from.
|
protected long |
doGetLastModifiedTime()
Returns the last modified time of this file.
|
protected FileType |
doGetType()
Determines the type of the file.
|
protected String[] |
doListChildren()
Lists the children of the file.
|
canRenameTo, childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doCreateFileContent, doCreateFolder, doDelete, doDetach, doGetAttributes, doGetCertificates, doGetInputStream, doGetOutputStream, doGetRandomAccessContent, doIsExecutable, doIsHidden, doIsReadable, doIsSameFile, doIsSymbolicLink, doIsWriteable, doListChildrenResolved, doRemoveAttribute, doRename, doSetAttribute, doSetExecutable, doSetLastModifiedTime, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, 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 UrlFileObject(UrlFileSystem fs, AbstractFileName fileName)
protected void doAttach() throws Exception
doAttach
in class AbstractFileObject<UrlFileSystem>
Exception
- if an error occurs.protected URL createURL(FileName name) throws MalformedURLException, FileSystemException, org.apache.commons.httpclient.URIException
MalformedURLException
FileSystemException
org.apache.commons.httpclient.URIException
protected FileType doGetType() throws Exception
doGetType
in class AbstractFileObject<UrlFileSystem>
Exception
- if an error occurs.protected long doGetContentSize() throws Exception
doGetContentSize
in class AbstractFileObject<UrlFileSystem>
Exception
- if an error occurs.protected long doGetLastModifiedTime() throws Exception
doGetLastModifiedTime
in class AbstractFileObject<UrlFileSystem>
Exception
- if an error occurs.protected String[] doListChildren() throws Exception
doListChildren
in class AbstractFileObject<UrlFileSystem>
Exception
- if an error occurs.protected InputStream doGetInputStream(int bufferSize) throws Exception
doGetInputStream
in class AbstractFileObject<UrlFileSystem>
bufferSize
- Buffer size hint.Exception
- if an error occurs.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.