org.dmonix.util.zip
Class ZipFileEntry

java.lang.Object
  extended byjava.util.zip.ZipEntry
      extended byorg.dmonix.util.zip.ZipFileEntry
All Implemented Interfaces:
java.lang.Cloneable, java.util.zip.ZipConstants

public class ZipFileEntry
extends java.util.zip.ZipEntry

Extends the java.util.zip.ZipEntry class with additional methods. Copyright: Copyright (c) 2001 Company: dmonix.org

Version:
1.0
Author:
Peter Nerg

Field Summary
 
Fields inherited from class java.util.zip.ZipEntry
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, DEFLATED, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER, STORED
 
Constructor Summary
ZipFileEntry(java.lang.String name)
          Creates a ZIP entry.
ZipFileEntry(java.util.zip.ZipEntry zipEntry)
          Creates a ZIP entry from an other ZIPEntry.
 
Method Summary
 java.lang.String getAbsolutePath()
          Return the entire path of the file represented by this entry
 java.lang.String getName()
          Return the name of the file represented by this entry
 java.lang.String getParent()
          Return the parent path to the file represented by this entry
 float getRatio()
          Return the ratio of the packaged entry vs. the original file.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.util.zip.ZipEntry
clone, getComment, getCompressedSize, getCrc, getExtra, getMethod, getSize, getTime, hashCode, isDirectory, setComment, setCompressedSize, setCrc, setExtra, setMethod, setSize, setTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZipFileEntry

public ZipFileEntry(java.lang.String name)
Creates a ZIP entry.

Parameters:
name - The name of the entry

ZipFileEntry

public ZipFileEntry(java.util.zip.ZipEntry zipEntry)
Creates a ZIP entry from an other ZIPEntry.

Parameters:
zipEntry - The entry
Method Detail

getAbsolutePath

public java.lang.String getAbsolutePath()
Return the entire path of the file represented by this entry

Returns:
String

getName

public java.lang.String getName()
Return the name of the file represented by this entry

Returns:
String

getParent

public java.lang.String getParent()
Return the parent path to the file represented by this entry

Returns:
The name of the parent, null if there is no parent

getRatio

public float getRatio()
Return the ratio of the packaged entry vs. the original file.
In case the compressed file is larger than the original file, the method will return 0.

Returns:
0-100

toString

public java.lang.String toString()
Returns a string representation of the object.

Returns:
The string representation


Copyright © 1998-2005 dmonix.org Peter Nerg, All Rights Reserved.