|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.entitymanager.logic.file.AbstractFile
se.entitymanager.logic.file.ZippedDirectoryFile
public class ZippedDirectoryFile
An AbstractFile
that represents a zipped directory within a ZipFile
.
ZipFile
Field Summary | |
---|---|
private java.util.List |
children
List of children. |
private java.util.zip.ZipEntry |
zipEntry
The zip entry that describes this directory. |
private java.util.zip.ZipFile |
zipFile
The zip file that contains this directory. |
Fields inherited from class se.entitymanager.logic.file.AbstractFile |
---|
fileContents, lastModified, name, parent, readable, size, writeable |
Constructor Summary | |
---|---|
protected |
ZippedDirectoryFile(java.util.zip.ZipFile zipFile,
java.util.zip.ZipEntry zipEntry,
AbstractFile parent)
Constructs a zipped directory that is contained in zipFile , with zipEntry and parent . |
Method Summary | |
---|---|
private boolean |
contains(java.util.zip.ZipEntry zipEntry)
Checks whether this directory contains zipEntry . |
protected void |
copy()
Copy this file. |
protected void |
delete()
Deletes this file. |
protected java.util.List |
getAllChildren()
Returns all direct child files. |
java.lang.String |
getFileContents()
Returns the contents of this file. |
java.util.zip.ZipEntry |
getZipEntry()
Returns the zip entry that describes this directory. |
java.util.zip.ZipFile |
getZipFile()
Returns the zip file which contains this directory. |
protected boolean |
isFolderish()
Returns whether this file is folderish. |
protected void |
paste()
Paste the file from the clipboard. |
protected void |
rename(java.lang.String newName)
Renames this file to newName . |
Methods inherited from class se.entitymanager.logic.file.AbstractFile |
---|
getLastModified, getName, getParent, getSize, isReadable, isWriteable, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.List children
private java.util.zip.ZipFile zipFile
private java.util.zip.ZipEntry zipEntry
Constructor Detail |
---|
protected ZippedDirectoryFile(java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry zipEntry, AbstractFile parent)
zipFile
, with zipEntry
and parent
.
zipFile
- the zip file that contains this directoryzipEntry
- the zip entry that describes this directoryparent
- the parentMethod Detail |
---|
protected java.util.List getAllChildren() throws EntityNotFolderishException
AbstractFile
The objects within the list are instances derived from AbstractFile
getAllChildren
in class AbstractFile
EntityNotFolderishException
- if this file is not folderishprivate boolean contains(java.util.zip.ZipEntry zipEntry)
zipEntry
.
zipEntry
- the entry to look for
public java.util.zip.ZipFile getZipFile()
public java.util.zip.ZipEntry getZipEntry()
protected boolean isFolderish()
AbstractFile
Folderish files like directories or zip files may contain other files.
isFolderish
in class AbstractFile
protected void rename(java.lang.String newName) throws EntityRenameFailedException
AbstractFile
newName
.
rename
in class AbstractFile
newName
- new name of this file.
EntityRenameFailedException
- if an error occurredprotected void delete() throws EntityDeletionFailedException
AbstractFile
delete
in class AbstractFile
EntityDeletionFailedException
- if an error occurredprotected void copy() throws EntityCopyCutFailedException
AbstractFile
copy
in class AbstractFile
EntityCopyCutFailedException
- if an error occurredprotected void paste() throws EntityPasteFailedException
AbstractFile
paste
in class AbstractFile
EntityPasteFailedException
- if an error occurredpublic java.lang.String getFileContents()
AbstractFile
getFileContents
in class AbstractFile
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |