|
||||||||||
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.zip.ZipFileObject
public class ZipFileObject
A file in a Zip file system.
Field Summary | |
---|---|
private java.util.HashSet |
children
|
protected java.util.zip.ZipEntry |
entry
|
private ZipFileSystem |
fs
|
private FileType |
type
|
Constructor Summary | |
---|---|
protected |
ZipFileObject(FileName name,
java.util.zip.ZipEntry entry,
ZipFileSystem fs,
boolean zipExists)
|
Method Summary | |
---|---|
void |
attachChild(FileName childName)
Attaches a child |
protected long |
doGetContentSize()
Returns the size of the file content (in bytes). |
protected java.io.InputStream |
doGetInputStream()
Creates an input stream to read the file content from. |
protected long |
doGetLastModifiedTime()
Returns the last modified time of this file. |
protected FileType |
doGetType()
Returns the file's type. |
protected java.lang.String[] |
doListChildren()
Lists the children of the file. |
boolean |
isWriteable()
Determines if this file can be written to. |
protected void |
setZipEntry(java.util.zip.ZipEntry entry)
Sets the details for this file object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.commons.vfs.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 Detail |
---|
private final java.util.HashSet children
private final ZipFileSystem fs
protected java.util.zip.ZipEntry entry
private FileType type
Constructor Detail |
---|
protected ZipFileObject(FileName name, java.util.zip.ZipEntry entry, ZipFileSystem fs, boolean zipExists) throws FileSystemException
FileSystemException
Method Detail |
---|
protected void setZipEntry(java.util.zip.ZipEntry entry)
public void attachChild(FileName childName)
public boolean isWriteable() throws FileSystemException
isWriteable
in interface FileObject
isWriteable
in class AbstractFileObject
true
if this file is writeable, false
if not.
FileSystemException
- On error determining if this file exists.protected FileType doGetType()
doGetType
in class AbstractFileObject
protected java.lang.String[] doListChildren()
doListChildren
in class AbstractFileObject
protected long doGetContentSize()
doGetType()
returns FileType.FILE
.
doGetContentSize
in class AbstractFileObject
protected long doGetLastModifiedTime() throws java.lang.Exception
doGetLastModifiedTime
in class AbstractFileObject
java.lang.Exception
protected java.io.InputStream doGetInputStream() throws java.lang.Exception
doGetType()
returns FileType.FILE
. The input stream
returned by this method is guaranteed to be closed before this
method is called again.
doGetInputStream
in class AbstractFileObject
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |