Class CompressedFileFileObject
java.lang.Object
org.apache.commons.vfs.provider.AbstractFileObject
org.apache.commons.vfs.provider.compressed.CompressedFileFileObject
- All Implemented Interfaces:
FileObject
- Direct Known Subclasses:
Bzip2FileObject,GzipFileObject
A compressed file.
Such a file do only have one child (the compressed filename with stripped last extension)
Such a file do only have one child (the compressed filename with stripped last extension)
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Mario Ivankovits
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompressedFileFileObject(FileName name, FileObject container, CompressedFileFileSystem fs) -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates this file, if it does not exist.protected longReturns the size of the file content (in bytes).protected longReturns the last modified time of this file.protected FileTypeReturns the file's type.protected String[]Lists the children of the file.protected FileObjectbooleanDetermines if this file can be written to.Methods inherited from class org.apache.commons.vfs.provider.AbstractFileObject
canRenameTo, childrenChanged, childrenChanged, close, copyFrom, createFolder, delete, delete, doAttach, doCreateFolder, doDelete, doDetach, doGetAttributes, doGetCertificates, doGetInputStream, doGetOutputStream, doGetRandomAccessContent, doIsHidden, doIsReadable, doIsSameFile, doIsWriteable, doListChildrenResolved, doRename, doSetAttribute, doSetLastModifiedTime, 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, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, toStringMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.vfs.FileObject
canRenameTo, close, copyFrom, createFolder, delete, delete, exists, findFiles, findFiles, getChild, getChildren, getContent, getFileOperations, getFileSystem, getName, getParent, getType, getURL, isAttached, isContentOpen, isHidden, isReadable, moveTo, refresh, resolveFile, resolveFile
-
Constructor Details
-
CompressedFileFileObject
protected CompressedFileFileObject(FileName name, FileObject container, CompressedFileFileSystem fs)
-
-
Method Details
-
isWriteable
Determines if this file can be written to.- Specified by:
isWriteablein interfaceFileObject- Overrides:
isWriteablein classAbstractFileObject- Returns:
trueif this file is writeable,falseif not.- Throws:
FileSystemException- On error determining if this file exists.
-
doGetType
Returns the file's type.- Specified by:
doGetTypein classAbstractFileObject- Throws:
FileSystemException
-
doListChildren
Lists the children of the file.- Specified by:
doListChildrenin classAbstractFileObject
-
doGetContentSize
protected long doGetContentSize()Returns the size of the file content (in bytes). Is only called ifdoGetType()returnsFileType.FILE.- Specified by:
doGetContentSizein classAbstractFileObject
-
doGetLastModifiedTime
Returns the last modified time of this file.- Overrides:
doGetLastModifiedTimein classAbstractFileObject- Throws:
Exception
-
getContainer
-
createFile
Description copied from class:AbstractFileObjectCreates this file, if it does not exist.- Specified by:
createFilein interfaceFileObject- Overrides:
createFilein classAbstractFileObject- Throws:
FileSystemException- If the file already exists with the wrong type, or the parent folder is read-only, or on error creating this file or one of its ancestors.
-