Packagenochump.util.zip
Classpublic class ZipFile

This class represents a Zip archive. You can ask for the contained entries, or get an input stream for a file entry. The entry is automatically decompressed.



Public Properties
 PropertyDefined by
  entries : Array
[read-only] Returns an array of all Zip entries in this Zip file.
ZipFile
  size : uint
[read-only] Returns the number of entries in this zip file.
ZipFile
Public Methods
 MethodDefined by
  
ZipFile(data:IDataInput)
Opens a Zip file reading the given data.
ZipFile
  
getEntry(name:String):ZipEntry
Searches for a zip entry in this archive with the given name.
ZipFile
  
getInput(entry:ZipEntry):ByteArray
Creates a byte array reading the given zip entry as uncompressed data.
ZipFile
Property detail
entriesproperty
entries:Array  [read-only]

Returns an array of all Zip entries in this Zip file.

Implementation
    public function get entries():Array
sizeproperty 
size:uint  [read-only]

Returns the number of entries in this zip file.

Implementation
    public function get size():uint
Constructor detail
ZipFile()constructor
public function ZipFile(data:IDataInput)

Opens a Zip file reading the given data.

Parameters
data:IDataInput
Method detail
getEntry()method
public function getEntry(name:String):ZipEntry

Searches for a zip entry in this archive with the given name.

Parameters
name:String — the name. May contain directory components separated by slashes ('/').

Returns
ZipEntry — the zip entry, or null if no entry with that name exists.
getInput()method 
public function getInput(entry:ZipEntry):ByteArray

Creates a byte array reading the given zip entry as uncompressed data. Normally zip entry should be an entry returned by getEntry() or entries().

Parameters
entry:ZipEntry — the entry to create a byte array for.

Returns
ByteArray — the byte array, or null if the requested entry does not exist.