⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 extending.fm2.html

📁 IMAGEIO package 的使用说明jdk1.4新出的 包。有效改进图片读写方式。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><title>Java Image I/O API Guide: 4 - Writing Image I/O Plug-ins</title></head><body bgcolor="#ffffff"> <table summary="layout" width="100%"><tr><td><!-- Bug in Communicator w/font: NavBar text disappears for Times 14pt pref. --><!-- font size="-1" --> <a href="imageio_guideTOC.fm.html" tppabs="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/spec/imageio_guideTOC.fm.html">CONTENTS</a> | <a href="extending.fm1.html" tppabs="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/spec/extending.fm1.html">PREV</a> | <a href="extending.fm3.html" tppabs="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/spec/extending.fm3.html">NEXT</a> <!-- | <a href="copyright.fm.html">INDEX</a>  --><!-- /font --></td><td align=right><i>Java<sup><font size="-1">TM</font></sup></font> Image I/O API Guide</i></td></tr></table><br> <p><hr size="8" width="35%" align="left" noshade><h2><a name="996925"><i>4.2	</i> Embedding Plug-ins in JAR Files</a></h2><blockquote><a name="996941"><!-- --></a>Since a plug-in consists of several classes, the JAR file mechanism is used to allow them to be combined into a single file. In addition to class files, JAR files may contain additional files used to describe their contents. In particular, a JAR file may contain a <code>META-INF/services</code> directory that is used to list any service providers that are contained in the file. For each service provider interface that is implemented by a class stored in the JAR file, a file whose name is the fully-qualified class name of the service provider interface is placed within the <code>services</code> directory. The file should contain the fully-qualified class names of the implementation classes present in the JAR file, one per line. For example, if the JAR file contains a service provider class named <code>com.mycompany.mypackage.MyImageReaderSpi</code>, which implements the <code>javax.imageio.spi.ImageReaderSpi</code> interface, there should be a file named <code>META-INF/services/javax.imageio.spi.ImageReaderSpi</code> containing the line <code>com.mycompany.mypackage.MyImageReaderSpi</code>.<p><a name="996951"><!-- --></a>The Image I/O API will automatically examine any JAR files that are found on the class path, and identify those that contain Image I/O plug-ins. For each plug-in found, a single instance of its service provider class will be instantiated and stored in a run-time registry class, <code>javax.iamgeio.spi.IIORegistry</code>.<p>     <a name="996964"><!-- --></a>JAR files on the application class path (i.e., the path set using the <code>CLASSPATH</code> variable), or elsewhere (e.g., available via a network URL) may be loaded by the application. They are not loaded by default in order to minimize startup time.<p><a name="999336"><!-- --></a>The <code>javax.imageio.spi.IIORegistry</code> class may also be used at run-time to deregister installed plug-ins and to register new ones. In particular, it is possible to use a <code>ClassLoader</code> to load a plug-in over the network, which may then be registered and used exactly like a locally installed plug-in.<p><a name="999353"><!-- --></a>Most applications should not need to deal directly with the registry. Instead, they may make use of convenience methods contained within the <code>javax.imageio.ImageIO</code> class that search for appropriate plug-ins automatically.<p></blockquote><br><hr><!-- Bug in Communicator w/font: NavBar text disappears for Times 14pt pref. --><!-- font size="-1" --> <a href="imageio_guideTOC.fm.html" tppabs="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/spec/imageio_guideTOC.fm.html">CONTENTS</a> | <a href="extending.fm1.html" tppabs="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/spec/extending.fm1.html">PREV</a> | <a href="extending.fm3.html" tppabs="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/spec/extending.fm3.html">NEXT</a> <!-- | <a href="copyright.fm.html">INDEX</a>  --><!-- /font --><hr><font size="-1"><i><A HREF="copyright.fm.html" tppabs="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/spec/copyright.fm.html">Copyright</a> &#169 2001 Sun Microsystems, Inc. All Rights Reserved.</i></font><!-- This HTML file was created with Quadralay WebWorks Publisher 3.5.0 --><!-- by Suzette Pelouch --><!-- Last updated: Fri Apr 27 11:23:03 2001 --> </body><script language="JavaScript" src="s_code_remote.js" tppabs="http://java.sun.com/js/omi/jsc/s_code_remote.js"></script></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -