|
|||||||||||
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.DelegateFileObject
A file backed by another file.
Constructor Summary | |
DelegateFileObject(FileName name,
AbstractFileSystem fileSystem,
FileObject file)
|
Method Summary | |
void |
attachChild(FileName baseName,
FileType type)
Adds a child to this file. |
void |
close()
Close the delegated file |
protected void |
doCreateFolder()
Creates this file as a folder. |
protected void |
doDelete()
Deletes the file. |
protected Map |
doGetAttributes()
Returns the attributes of this file. |
protected Certificate[] |
doGetCertificates()
Returns the certificates of this file. |
protected long |
doGetContentSize()
Returns the size of the file content (in bytes). |
protected InputStream |
doGetInputStream()
Creates an input stream to read the file content from. |
protected long |
doGetLastModifiedTime()
Returns the last-modified time of this file. |
protected OutputStream |
doGetOutputStream(boolean bAppend)
Creates an output stream to write the file content to. |
protected FileType |
doGetType()
Determines the type of the file, returns null if the file does not exist. |
protected boolean |
doIsHidden()
Determines if this file is hidden. |
protected boolean |
doIsReadable()
Determines if this file can be read. |
protected boolean |
doIsWriteable()
Determines if this file can be written to. |
protected String[] |
doListChildren()
Lists the children of the file. |
protected void |
doSetAttribute(String atttrName,
Object value)
Sets an attribute of this file. |
protected void |
doSetLastModifiedTime(long modtime)
Sets the last-modified time of this file. |
void |
fileChanged(FileChangeEvent event)
Called when a file is changed. |
void |
fileCreated(FileChangeEvent event)
Called when a file is created. |
void |
fileDeleted(FileChangeEvent event)
Called when a file is deleted. |
void |
setFile(FileObject file)
Attaches or detaches the target file. |
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileObject |
canRenameTo, childrenChanged, childrenChanged, copyFrom, createFile, createFolder, delete, delete, doAttach, doDetach, doGetRandomAccessContent, doIsSameFile, doListChildrenResolved, doRename, endOutput, exists, finalize, findFiles, findFiles, getChild, getChildren, getContent, getFileContentInfoFactory, 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 |
Constructor Detail |
public DelegateFileObject(FileName name, AbstractFileSystem fileSystem, FileObject file) throws FileSystemException
Method Detail |
public void attachChild(FileName baseName, FileType type) throws Exception
Exception
public void setFile(FileObject file) throws Exception
Exception
protected FileType doGetType() throws FileSystemException
doGetType
in class AbstractFileObject
FileSystemException
protected boolean doIsReadable() throws FileSystemException
doIsReadable
in class AbstractFileObject
FileSystemException
protected boolean doIsWriteable() throws FileSystemException
doIsWriteable
in class AbstractFileObject
FileSystemException
protected boolean doIsHidden() throws FileSystemException
doIsHidden
in class AbstractFileObject
FileSystemException
protected String[] doListChildren() throws Exception
doListChildren
in class AbstractFileObject
Exception
protected void doCreateFolder() throws Exception
doCreateFolder
in class AbstractFileObject
Exception
protected void doDelete() throws Exception
doDelete
in class AbstractFileObject
Exception
protected long doGetContentSize() throws Exception
doGetType()
returns FileType.FILE
.
doGetContentSize
in class AbstractFileObject
Exception
protected Map doGetAttributes() throws Exception
doGetAttributes
in class AbstractFileObject
Exception
protected void doSetAttribute(String atttrName, Object value) throws Exception
doSetAttribute
in class AbstractFileObject
Exception
protected Certificate[] doGetCertificates() throws Exception
doGetCertificates
in class AbstractFileObject
Exception
protected long doGetLastModifiedTime() throws Exception
doGetLastModifiedTime
in class AbstractFileObject
Exception
protected void doSetLastModifiedTime(long modtime) throws Exception
doSetLastModifiedTime
in class AbstractFileObject
Exception
protected InputStream doGetInputStream() throws Exception
doGetInputStream
in class AbstractFileObject
Exception
protected OutputStream doGetOutputStream(boolean bAppend) throws Exception
doGetOutputStream
in class AbstractFileObject
Exception
public void fileCreated(FileChangeEvent event) throws Exception
fileCreated
in interface FileListener
Exception
public void fileDeleted(FileChangeEvent event) throws Exception
fileDeleted
in interface FileListener
Exception
public void fileChanged(FileChangeEvent event) throws Exception
FileMonitor
.
fileChanged
in interface FileListener
Exception
public void close() throws FileSystemException
close
in interface FileObject
close
in class AbstractFileObject
FileSystemException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |