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

📄 structureddocumentfactory.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the prefered mime-type for a given file extension. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/document/StructuredDocumentFactory.html#newStructuredDocument(net.jxta.document.MimeMediaType, java.io.InputStream)">newStructuredDocument</A></B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype,                      java.io.InputStream&nbsp;stream)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an instance of <A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document"><CODE>StructuredDocument</CODE></A> matching the mime-type specified by the <CODE>mimetype</CODE> parameter. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/document/StructuredDocumentFactory.html#newStructuredDocument(net.jxta.document.MimeMediaType, java.io.Reader)">newStructuredDocument</A></B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype,                      java.io.Reader&nbsp;reader)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an instance of <A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document"><CODE>StructuredDocument</CODE></A> matching the mime-type specified by the <CODE>mimetype</CODE> parameter. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/document/StructuredDocumentFactory.html#newStructuredDocument(net.jxta.document.MimeMediaType, java.lang.String)">newStructuredDocument</A></B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype,                      java.lang.String&nbsp;doctype)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an instance of <A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document"><CODE>StructuredDocument</CODE></A> matching the mime-type specified by the <CODE>mimetype</CODE> parameter. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/document/StructuredDocumentFactory.html#newStructuredDocument(net.jxta.document.MimeMediaType, java.lang.String, java.lang.String)">newStructuredDocument</A></B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype,                      java.lang.String&nbsp;doctype,                      java.lang.String&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an instance of <A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document"><CODE>StructuredDocument</CODE></A> matching the mime-type specified by the <CODE>mimetype</CODE> parameter. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/document/StructuredDocumentFactory.html#registerAssoc(java.lang.String)">registerAssoc</A></B>(java.lang.String&nbsp;className)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a class with the factory from its class name. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/document/StructuredDocumentFactory.html#registerInstantiator(net.jxta.document.MimeMediaType, net.jxta.document.StructuredDocumentFactory.Instantiator)">registerInstantiator</A></B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype,                     <A HREF="../../../net/jxta/document/StructuredDocumentFactory.Instantiator.html" title="interface in net.jxta.document">StructuredDocumentFactory.Instantiator</A>&nbsp;instantiator)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register an instantiator object a mime-type of documents to be constructed.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_net.jxta.util.ClassFactory"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class net.jxta.util.<A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#getAvailableKeys()">getAvailableKeys</A>, <A HREF="../../../net/jxta/util/ClassFactory.html#getEntrySet()">getEntrySet</A>, <A HREF="../../../net/jxta/util/ClassFactory.html#getInstantiator(java.lang.Object)">getInstantiator</A>, <A HREF="../../../net/jxta/util/ClassFactory.html#registerAssoc(java.lang.Object, java.lang.Object)">registerAssoc</A>, <A HREF="../../../net/jxta/util/ClassFactory.html#registerFromResources(java.lang.String, java.lang.String)">registerFromResources</A>, <A HREF="../../../net/jxta/util/ClassFactory.html#registerFromString(java.lang.String)">registerFromString</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getAssocTable()"><!-- --></A><H3>getAssocTable</H3><PRE>protected java.util.Map <B>getAssocTable</B>()</PRE><DL><DD>Used by ClassFactory methods to get the mapping of Mime Types to  constructors.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#getAssocTable()">getAssocTable</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Hastable the hashtable containing the mappings.</DL></DD></DL><HR><A NAME="getClassForKey()"><!-- --></A><H3>getClassForKey</H3><PRE>protected java.lang.Class <B>getClassForKey</B>()</PRE><DL><DD>Used by ClassFactory methods to ensure that all keys used with the mapping are of the correct type.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#getClassForKey()">getClassForKey</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Class object of the key type.</DL></DD></DL><HR><A NAME="getClassOfInstantiators()"><!-- --></A><H3>getClassOfInstantiators</H3><PRE>protected java.lang.Class <B>getClassOfInstantiators</B>()</PRE><DL><DD>Used by ClassFactory methods to ensure that all of the instantiators  which are registered with this factory have the correct interface.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#getClassOfInstantiators()">getClassOfInstantiators</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Class object of the "Factory" type.</DL></DD></DL><HR><A NAME="registerAssoc(java.lang.String)"><!-- --></A><H3>registerAssoc</H3><PRE>protected boolean <B>registerAssoc</B>(java.lang.String&nbsp;className)</PRE><DL><DD>Register a class with the factory from its class name. We override the  standard implementation to get the mime type from the class and  use that as the key to register the class with the factory.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/jxta/util/ClassFactory.html#registerAssoc(java.lang.String)">registerAssoc</A></CODE> in class <CODE><A HREF="../../../net/jxta/util/ClassFactory.html" title="class in net.jxta.util">ClassFactory</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>className</CODE> - The class name which will be regiestered.<DT><B>Returns:</B><DD>boolean true if the class was registered otherwise false.</DL></DD></DL><HR><A NAME="getFileExtensionForMimeType(net.jxta.document.MimeMediaType)"><!-- --></A><H3>getFileExtensionForMimeType</H3><PRE>public static java.lang.String <B>getFileExtensionForMimeType</B>(<A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A>&nbsp;mimetype)</PRE><DL><DD>Returns the prefered extension for a given mime-type. If there is no  mapping or no prefered extension for this mimetype then null is  returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mimetype</CODE> - the MimeMediaType we wish to know the file extension for.<DT><B>Returns:</B><DD>String containing the extension or null for mime-types with no  known association.</DL></DD></DL><HR><A NAME="getMimeTypeForFileExtension(java.lang.String)"><!-- --></A><H3>getMimeTypeForFileExtension</H3><PRE>public static <A HREF="../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A> <B>getMimeTypeForFileExtension</B>(java.lang.String&nbsp;extension)</PRE>

⌨️ 快捷键说明

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