Apache POI - POIFS - Java implementation of the OLE 2 Compound Document format(Apache POI - POIFS - OLE 2 复合文档格式的 Java 实现)

Overview(概述)

Overview(概述)

POIFS is a pure Java implementation of the OLE 2 Compound Document format.(POIFS 是 OLE 2 复合文档格式的纯 Java 实现。)

By definition, all APIs developed by the POI project are based somehow on the POIFS API.(根据定义,POI 项目开发的所有 API 都以某种方式建立在POIFS API上。)

A common confusion is on just what POIFS buys you or what OLE 2 Compound Document format is exactly. POIFS does not buy you DOC, or XLS, but is necessary to generate or read DOC or XLS files. You see, all file formats based on the OLE 2 Compound Document Format have a common structure. The OLE 2 Compound Document Format is essentially a convoluted archive format. Think of POIFS as a "zip" library. Once you can get the data in a zip file you still need to interpret the data. As a general rule, while all of our formats use POIFS, most of them attempt to abstract you from it. There are some circumstances where this is not possible, but as a general rule this is true.(一个常见的混淆是 POIFS 给您买了什么或 OLE 2 复合文档格式到底是什么。 POIFS 不会为您购买 DOC 或 XLS,但它是生成或读取 DOC 或 XLS 文件所必需的。您会看到,所有基于 OLE 2 复合文档格式的文件格式都有一个共同的结构。 OLE 2 复合文档格式本质上是一种复杂的存档格式。将 POIFS 视为一个“zip”库。一旦您可以获取得zip文件中数据,您还是需要解释数据。一般来说,虽然我们所有的格式都使用 POIFS,但它们中大多数都试图将您从中提取出来。在某些情况下这是不可能的,但 一般来说,这是正确的。)

If you're an end user type just looking to generate XLS files, then you'd be looking for HSSF not POIFS; however, if you have legacy code that uses MFC property sets, POIFS is for you! Regardless, you may or may not need to know how to use POIFS but ultimately if you use technologies that come from the POI project, you're using POIFS underneath. Perhaps we should have a branding campaign "POIFS Inside!". ;-)(如果您是只希望生成 XLS 文件的最终用户类型,那么您会寻找 HSSF 而不是 POIFS;但是,如果您有使用 MFC 属性集的旧代码,那么 POIFS 适合您!无论如何,您可能需要或不需要知道如何使用 POIFS,但最终如果您使用来自 POI 项目的技术,您将在底层使用 POIFS。也许我们应该有一个品牌宣传活动“POIFS Inside!”。 ;-))

by Andrew C. Oliver, Nicola Ken Barozzi(作者:Andrew C. Oliver、Nicola Ken Barozzi)

 
中英文 | 中文 | 英文