nsIZipReaderCache

Please add a summary to this article.
Inherits from: nsISupports Last changed in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7)

Implemented by: @mozilla.org/libjar/zip-reader-cache;1. To create an instance, use:

var zipReaderCache = Components.classes["@mozilla.org/libjar/zip-reader-cache;1"]
                     .createInstance(Components.interfaces.nsIZipReaderCache);

Method overview

nsIZipReader getInnerZip(in nsIFile zipFile, in AUTF8String zipEntry);
nsIZipReader getInnerZip(in nsIFile zipFile, in string zipEntry); Obsolete since Gecko 10
nsIZipReader getZip(in nsIFile zipFile);
void init(in unsigned long cacheSize);

Methods

getInnerZip()

Returns a (possibly shared) cached nsIZipReader for a zip inside another zip.

nsIZipReader getInnerZip(
  in nsIFile zipFile,
  in AUTF8String zipEntry
);
Parameters
zipFile
The zip file.
zipEntry
The zip entry.
Return value

The nsIZipReader for the given zip file.

getZip()

Returns a (possibly shared) cached nsIZipReader for a zip file.

If the zip reader for the given file is not in the cache, a new nsIZipReader is opened (see nsIZipReader.open()). Otherwise the previously created nsIZipReader is returned.

Note: If nsIZipReader.close has been called on the shared nsIZipReader, this method will return the closed nsIZipReader

nsIZipReader getZip(
  in nsIFile zipFile
);
Parameters
zipFile
The zip file.
Return value

The nsIZipReader for the given zip file.

init()

Initializes a new zip reader cache.

void init(
  in unsigned long cacheSize
);
Parameters
cacheSize
The number of released entries to maintain before beginning to throw some out. The number of outstanding entries can be much greater than this number, this is the count for those otherwise unused entries.

See also