Packagedeng.fzip
Classpublic class FZipFile

Represents a file contained in a ZIP archive.



Public Properties
 PropertyDefined by
  content : ByteArray
The raw, uncompressed file.
FZipFile
  date : Date
The Date and time the file was created.
FZipFile
  filename : String
The file name (including relative path).
FZipFile
  sizeCompressed : uint
[read-only] The size of the compressed file (in bytes).
FZipFile
  sizeUncompressed : uint
[read-only] The size of the uncompressed file (in bytes).
FZipFile
  versionNumber : String
[read-only] The ZIP specification version supported by the software used to encode the file.
FZipFile
Public Methods
 MethodDefined by
  
FZipFile(filenameEncoding:String = "utf-8")
Constructor
FZipFile
  
getContentAsString(recompress:Boolean = true, charset:String = "utf-8"):String
Gets the files content as string.
FZipFile
  
serialize(stream:IDataOutput, includeAdler32:Boolean, centralDir:Boolean = false, centralDirOffset:uint = 0):uint
Serializes this zip archive into an IDataOutput stream (such as ByteArray or FileStream) according to PKZIP APPNOTE.TXT
FZipFile
  
setContentAsString(value:String, charset:String = "utf-8"):void
Sets a string as the file's content.
FZipFile
  
toString():String
Returns a string representation of the FZipFile object.
FZipFile
Property detail
contentproperty
content:ByteArray  [read-write]

The raw, uncompressed file.

Implementation
    public function get content():ByteArray
    public function set content(value:ByteArray):void
dateproperty 
date:Date  [read-write]

The Date and time the file was created.

Implementation
    public function get date():Date
    public function set date(value:Date):void
filenameproperty 
filename:String  [read-write]

The file name (including relative path).

Implementation
    public function get filename():String
    public function set filename(value:String):void
sizeCompressedproperty 
sizeCompressed:uint  [read-only]

The size of the compressed file (in bytes).

Implementation
    public function get sizeCompressed():uint
sizeUncompressedproperty 
sizeUncompressed:uint  [read-only]

The size of the uncompressed file (in bytes).

Implementation
    public function get sizeUncompressed():uint
versionNumberproperty 
versionNumber:String  [read-only]

The ZIP specification version supported by the software used to encode the file.

Implementation
    public function get versionNumber():String
Constructor detail
FZipFile()constructor
public function FZipFile(filenameEncoding:String = "utf-8")

Constructor

Parameters
filenameEncoding:String (default = "utf-8")
Method detail
getContentAsString()method
public function getContentAsString(recompress:Boolean = true, charset:String = "utf-8"):String

Gets the files content as string.

Parameters
recompress:Boolean (default = true) — If true, the raw file content is recompressed after decoding the string.
 
charset:String (default = "utf-8") — The character set used for decoding.

Returns
String — The file as string.
serialize()method 
public function serialize(stream:IDataOutput, includeAdler32:Boolean, centralDir:Boolean = false, centralDirOffset:uint = 0):uint

Serializes this zip archive into an IDataOutput stream (such as ByteArray or FileStream) according to PKZIP APPNOTE.TXT

Parameters
stream:IDataOutput — The stream to serialize the zip archive into.
 
includeAdler32:Boolean — If set to true, include Adler32 checksum.
 
centralDir:Boolean (default = false) — If set to true, serialize a central directory entry.
 
centralDirOffset:uint (default = 0) — Relative offset of local header (for central directory only).

Returns
uint — The serialized zip file.
setContentAsString()method 
public function setContentAsString(value:String, charset:String = "utf-8"):void

Sets a string as the file's content.

Parameters
value:String — The string.
 
charset:String (default = "utf-8") — The character set used for decoding.
toString()method 
public function toString():String

Returns a string representation of the FZipFile object.

Returns
String