JAF是什么?它的目的是什么?

发布于 2024-09-05 19:19:35 字数 129 浏览 10 评论 0原文

我无法理解 JAF(Java 激活框架)的用途。请用简单的术语向我解释一下,或者向我指出信息。

Java Mail API 使用 JAF。看起来 JAF 是用来查找对象的支持数据类型的。但我无法理解。

请教我!

I am unable to understand the purpose of JAF (Java Activation Framework). Please explain it to me in simple terms, or point me towards information.

The Java Mail API is using JAF. It looks like the JAF is used to find the supporting data types of an object. But I couldn't understand.

Please teach me!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凉宸 2024-09-12 19:19:35

JavaBeans Activation Framework 是一个库,用于抽象文件类型和处理它们的应用程序之间的操作系统特定绑定/映射。这可以基于 MIME 类型和/或文件扩展名。确实仅此而已。

打开 Windows 资源管理器并右键单击文件。可能存在各种操作(例如打开、编辑、播放)。与该文件关联的操作与 Windows 上的文件扩展名关联。 JAF 是它的便携式版本。它主要用于桌面应用程序能够与可与该计算机上的文件一起使用的任何程序进行交互。

The JavaBeans Activation Framework is a library for abstracting the operating system specific bindings/mappings between file types and applications that deal with them. This can be based on MIME types and/or file extensions. It's really nothing more than that.

Open up Windows explorer and right click on a file. Various actions may be there (eg Open, Edit, Play). What actions are associated with the file is associated with the file extension on Windows. JAF is a portable version of that. It's mainly intended for desktop applications to be able to interact with whatever programs can be used with files on that computer.

岁月苍老的讽刺 2024-09-12 19:19:35

它实际上是 JavaBeans 激活框架,我认为 文档解释得很好:

通过 JavaBeans 激活
框架标准扩展,
使用 Java 技术的开发人员可以
利用标准服务
确定任意类型
数据块,封装对数据的访问
它,发现可用的操作
并实例化
执行上述操作的适当 bean
运营)。例如,如果一个
浏览器获取到一张JPEG图片,这个
框架将使浏览器能够
将该数据流标识为
JPEG 图像,并且从该类型中,
浏览器可以定位并实例化
可以操纵的物体,或者
查看该图像。

您不清楚本段的哪些部分?

It's actually the JavaBeans Activation Framework and I think the docs explain it well:

With the JavaBeans Activation
Framework standard extension,
developers who use Java technology can
take advantage of standard services to
determine the type of an arbitrary
piece of data, encapsulate access to
it, discover the operations available
on it, and to instantiate the
appropriate bean to perform said
operation(s). For example, if a
browser obtained a JPEG image, this
framework would enable the browser to
identify that stream of data as an
JPEG image, and from that type, the
browser could locate and instantiate
an object that could manipulate, or
view that image.

What parts of this paragraph are not clear to you?

-残月青衣踏尘吟 2024-09-12 19:19:35

OT:有 JDK7中的类似功能(尽管当然不能被视为完全替代)

OT: there is similar functionality in JDK7 (although certainly cannot be considered as full replacement)

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