?? instantiator.html
字號:
throws java.net.MalformedURLException, java.net.UnknownServiceException</PRE><DL><DD>Construct a new ID instance from a JXTA ID contained in a URI.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#fromURL(java.net.URL)">fromURL</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - URI which will be decoded to create a new ID instance.<DT><B>Returns:</B><DD>ID containing the new ID instance initialized from the URI.<DT><B>Throws:</B><DD><CODE>java.net.UnknownServiceException</CODE> - Is thrown if the URI provided is of a format unrecognized by this JXTA implementation.<DD><CODE>java.net.MalformedURLException</CODE> - Is thrown if the URI provided is not a valid, recognized JXTA URI.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id"><CODE>ID</CODE></A>, <CODE>URL</CODE></DL></DD></DL><HR><A NAME="newCodatID(net.jxta.peergroup.PeerGroupID)"><!-- --></A><H3>newCodatID</H3><PRE>public <A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat">CodatID</A> <B>newCodatID</B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> groupID)</PRE><DL><DD>Creates a new CodatID Instance. A new random CodatID is created for the provided Peer Group. This type of CodatID can be used as a canonical reference for dynamic content.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newCodatID(net.jxta.peergroup.PeerGroupID)">newCodatID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>groupID</CODE> - the group to which this content will belong.<DT><B>Returns:</B><DD>The newly created CodatID.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat"><CODE>CodatID</CODE></A>, <A HREF="../../../../net/jxta/codat/Codat.html" title="class in net.jxta.codat"><CODE>Codat</CODE></A></DL></DD></DL><HR><A NAME="newCodatID(net.jxta.peergroup.PeerGroupID, byte[])"><!-- --></A><H3>newCodatID</H3><PRE>public <A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat">CodatID</A> <B>newCodatID</B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> groupID, byte[] seed)</PRE><DL><DD>Creates a new CodatID instance. A new CodatID is created for the provided Peer Group. This type of CodatID can be used as a canonical reference for dynamic content. <p/>This varient of CodatID allows you to create "Well-known" codats within the context of diverse groups. This can be useful for common services that need to do discovery without advertisements or for network organization services. Because of the potential for ID collisions and the difficulties with maintaining common service interfaces this varient of CodatID should be used with great caution and pre-planning.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newCodatID(net.jxta.peergroup.PeerGroupID, byte[])">newCodatID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>groupID</CODE> - the group to which this content will belong.<DD><CODE>seed</CODE> - The seed information which will be used in creating the codatID. The seed information should be at least four bytes in length, though longer values are better.<DT><B>Returns:</B><DD>The newly created CodatID.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat"><CODE>CodatID</CODE></A>, <A HREF="../../../../net/jxta/codat/Codat.html" title="class in net.jxta.codat"><CODE>Codat</CODE></A></DL></DD></DL><HR><A NAME="newCodatID(net.jxta.peergroup.PeerGroupID, java.io.InputStream)"><!-- --></A><H3>newCodatID</H3><PRE>public <A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat">CodatID</A> <B>newCodatID</B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> groupID, java.io.InputStream in) throws java.io.IOException</PRE><DL><DD>Creates a new CodatID instance. A new random CodatID is created for the provided Peer Group and contains a hash value for the Codat data. This type of Codat ID is most appropriate for static content. By including a hash value this form of Codat ID provides greater assurance of the canonical property of IDs. It also allows the document content returned when this ID is used to be verified to ensure it has not been altered.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newCodatID(net.jxta.peergroup.PeerGroupID, java.io.InputStream)">newCodatID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>groupID</CODE> - The group to which this ID will belong.<DD><CODE>in</CODE> - The InputStream from which the content hash is calculated. The stream is read until EOF and then closed.<DT><B>Returns:</B><DD>The newly created CodatID.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - I/O Error reading document<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat"><CODE>CodatID</CODE></A>, <A HREF="../../../../net/jxta/codat/Codat.html" title="class in net.jxta.codat"><CODE>Codat</CODE></A></DL></DD></DL><HR><A NAME="newCodatID(net.jxta.peergroup.PeerGroupID, byte[], java.io.InputStream)"><!-- --></A><H3>newCodatID</H3><PRE>public <A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat">CodatID</A> <B>newCodatID</B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> groupID, byte[] seed, java.io.InputStream in) throws java.io.IOException</PRE><DL><DD>Creates a new CodatID instance. A new CodatID is created for the provided Peer Group and contains a hash value for the Codat data. By including a hash value this form of Codat ID provides greater assurance of the canonical property of IDs. It also allows the document content returned when this ID is used to be verified to ensure it has not been altered. This type of Codat ID is most appropriate for static content. <p/>This varient of CodatID allows you to create "Well-known" codats within the context of diverse groups. This can be useful for common services that need to do discovery without advertisements or for network organization services. Because of the potential for ID collisions and the difficulties with maintaining common service interfaces this varient of CodatID should be used with great caution and pre-planning.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newCodatID(net.jxta.peergroup.PeerGroupID, byte[], java.io.InputStream)">newCodatID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>groupID</CODE> - The group to which this ID will belong.<DD><CODE>seed</CODE> - The seed information which will be used in creating the codat ID. The seed information should be at least four bytes in length, though longer values are better.<DD><CODE>in</CODE> - The InputStream from which the content hash is calculated. The stream is read until EOF and then closed.<DT><B>Returns:</B><DD>The newly created CodatID.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - I/O Error reading document<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/codat/CodatID.html" title="class in net.jxta.codat"><CODE>CodatID</CODE></A>, <A HREF="../../../../net/jxta/codat/Codat.html" title="class in net.jxta.codat"><CODE>Codat</CODE></A></DL></DD></DL><HR><A NAME="newPeerID(net.jxta.peergroup.PeerGroupID)"><!-- --></A><H3>newPeerID</H3><PRE>public <A HREF="../../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> <B>newPeerID</B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> groupID)</PRE><DL><DD>Creates a new PeerID instance. A new random peer id will be generated. The PeerID will be a member of the provided group.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newPeerID(net.jxta.peergroup.PeerGroupID)">newPeerID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>groupID</CODE> - the group to which this PeerID will belong.<DT><B>Returns:</B><DD>The newly created PeerID.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer"><CODE>PeerID</CODE></A>, <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A></DL></DD></DL><HR><A NAME="newPeerID(net.jxta.peergroup.PeerGroupID, byte[])"><!-- --></A><H3>newPeerID</H3><PRE>public <A HREF="../../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> <B>newPeerID</B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> groupID, byte[] seed)</PRE><DL><DD>Creates a new PeerID instance. A new PeerID will be generated. The PeerID will be a member of the provided group.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newPeerID(net.jxta.peergroup.PeerGroupID, byte[])">newPeerID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>groupID</CODE> - the group to which this PeerID will belong.<DD><CODE>seed</CODE> - The seed information which will be used in creating the PeerID. The seed information should be at least four bytes in length, though longer values are better.<DT><B>Returns:</B><DD>The newly created PeerID.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer"><CODE>PeerID</CODE></A>, <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A></DL></DD></DL><HR><A NAME="newPeerGroupID()"><!-- --></A><H3>newPeerGroupID</H3><PRE>public <A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> <B>newPeerGroupID</B>()</PRE><DL><DD>Creates a new PeerGroupID instance. A new random peer group id will be generated. The PeerGroupID will be created using the default ID Format.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newPeerGroupID()">newPeerGroupID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The newly created PeerGroupID.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup"><CODE>PeerGroupID</CODE></A>, <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A></DL></DD></DL><HR><A NAME="newPeerGroupID(byte[])"><!-- --></A><H3>newPeerGroupID</H3><PRE>public <A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> <B>newPeerGroupID</B>(byte[] seed)</PRE><DL><DD>Creates a new PeerGroupID instance. A new PeerGroupID will be generated using the provided seed information. The PeerGroupID will be created using the default ID Format. <p/>This method allows you to create "Well-known" PeerGroupIDs. This is similar to how the JXTA "World Peer Group" and "Net Peer Group". "Well-known" IDs can be useful for common services that need to do discovery without advertisements or for network organization services. Because of the potential for ID collisions and the difficulties with maintaining common service interfaces this varient of PeerGroupID should be used with great caution and pre-planning.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html#newPeerGroupID(byte[])">newPeerGroupID</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/id/IDFactory.Instantiator.html" title="interface in net.jxta.id">IDFactory.Instantiator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>seed</CODE> - The seed information which will be used in creating the PeerGroupID. The seed information should be at least four bytes in length, though longer values are better.<DT><B>Returns:</B><DD>The newly created PeerGroupID.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup"><CODE>PeerGroupID</CODE></A>, <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A></DL></DD></DL>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -