nsIZipReaderCache 编辑

modules/libjar/nsIZipReader.idlScriptable 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:56 次

字数:4494

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文