Class ZipFileObject
java.lang.Object
org.apache.commons.vfs.provider.AbstractFileObject
org.apache.commons.vfs.provider.zip.ZipFileObject
- All Implemented Interfaces:
FileObject
- Direct Known Subclasses:
JarFileObject
A file in a Zip file system.
- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedZipFileObject(FileName name, ZipEntry entry, ZipFileSystem fs, boolean zipExists) -
Method Summary
Modifier and TypeMethodDescriptionvoidattachChild(FileName childName) Attaches a childprotected longReturns the size of the file content (in bytes).protected InputStreamCreates an input stream to read the file content from.protected longReturns the last modified time of this file.protected FileTypeReturns the file's type.protected String[]Lists the children of the file.booleanDetermines if this file can be written to.protected voidsetZipEntry(ZipEntry entry) Sets the details for this file object.Methods inherited from class AbstractFileObject
canRenameTo, childrenChanged, childrenChanged, close, copyFrom, createFile, createFolder, delete, delete, doAttach, doCreateFolder, doDelete, doDetach, doGetAttributes, doGetCertificates, 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 Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FileObject
canRenameTo, close, copyFrom, createFile, createFolder, delete, delete, exists, findFiles, findFiles, getChild, getChildren, getContent, getFileOperations, getFileSystem, getName, getParent, getType, getURL, isAttached, isContentOpen, isHidden, isReadable, moveTo, refresh, resolveFile, resolveFile
-
Field Details
-
entry
-
-
Constructor Details
-
ZipFileObject
protected ZipFileObject(FileName name, ZipEntry entry, ZipFileSystem fs, boolean zipExists) throws FileSystemException - Throws:
FileSystemException
-
-
Method Details
-
setZipEntry
Sets the details for this file object. -
attachChild
Attaches a child -
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
-
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
-
doGetInputStream
Creates an input stream to read the file content from. Is only called ifdoGetType()returnsFileType.FILE. The input stream returned by this method is guaranteed to be closed before this method is called again.- Specified by:
doGetInputStreamin classAbstractFileObject- Throws:
Exception
-