OSGi 初始配置,谈论 ZIP 字典条目?
osgi R4 规范“初始配置页面 231”谈到
“请求的结果必须是 ZIP 文件(内容类型应用程序/ZIP)”...“Zip 文件可能只包含四种类型的字典条目:文本、二进制、捆绑包或捆绑包 URL。 类型在 ZIP 条目的额外字段中指定'
除了具有单个名称的文件之外,我不知道 ZIP 文件。 有没有人找到一个显示这样的 zip 文件的示例?
非常感谢!
The osgi R4 specification on 'initial provisioning page 231' talks about
'The result of the request must be a ZIP file(content type application/ZIP)'...'The zip file may contain only four types of dictionary entries: text, binary, bundle or bundle-url. The types are specified in the ZIP entry's extra field'
I don't know a ZIP file other than having files with a single name.
Has anyone found an example which shows such a zip file ?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,ZipEntry 名称是名称-值对的“名称”部分,数据是“值”部分,并且 - 这是奇怪的位 - ZipEntry 的“额外”字段包含一个 MIME 类型,它解释了如何解释数据,例如解释为字节数组、字符串数据或指向“真实”数据的 URL。 确实相当巧妙。
我们倾向于认为 zip 文件只包含文件名和内容,但实际上 zip 文件中的每个条目都包含或可以包含相当多的元数据; 名称、“额外”数据、注释、CRC、使用的压缩方法等。Java.util.zip.ZipEntry 允许您设置所有这些字段,因此在 Java 中创建此类文件没有问题 - 即使我们没有人以前见过这样的野兽。
As I understand it, the ZipEntry name is the "name" part of the name-value pair, the data is the "value" part, and - here's the whacky bit - the "extra" field of ZipEntry holds a MIME type which explains how the data is to be interpreted, e.g. as a byte array, as String data, or as a URL pointing to the "real" data. Quite ingenious really.
We tend to think of a zip file as holding just file names and contents, but in fact each entry in a zip file holds or can hold quite a bit of metatdata; name, "extra" data, comment, CRC, compression method used, etc.. Java.util.zip.ZipEntry allows you to set all of these fields, so it's no problem to create such files in Java - even if none of us ever saw such a beast before.