Packagenochump.util.zip
Classpublic class ZipFile
InheritanceZipFile Inheritance Object

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
  
getEntryInput(name:String):ByteArray
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.
getEntryInput()method 
public function getEntryInput(name:String):ByteArray

Parameters

name:String

Returns
ByteArray
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.