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

📄 binaryid.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagPeerGroupID">Constant Field Values</A></DL></DL><HR><A NAME="flagPeerID"><!-- --></A><H3>flagPeerID</H3><PRE>public static final byte <B>flagPeerID</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagPeerID">Constant Field Values</A></DL></DL><HR><A NAME="flagPipeID"><!-- --></A><H3>flagPipeID</H3><PRE>public static final byte <B>flagPipeID</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagPipeID">Constant Field Values</A></DL></DL><HR><A NAME="flagModuleClassID"><!-- --></A><H3>flagModuleClassID</H3><PRE>public static final byte <B>flagModuleClassID</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagModuleClassID">Constant Field Values</A></DL></DL><HR><A NAME="flagModuleClassRoleID"><!-- --></A><H3>flagModuleClassRoleID</H3><PRE>public static final byte <B>flagModuleClassRoleID</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagModuleClassRoleID">Constant Field Values</A></DL></DL><HR><A NAME="flagModuleSpecID"><!-- --></A><H3>flagModuleSpecID</H3><PRE>public static final byte <B>flagModuleSpecID</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagModuleSpecID">Constant Field Values</A></DL></DL><HR><A NAME="flagCodatID"><!-- --></A><H3>flagCodatID</H3><PRE>public static final byte <B>flagCodatID</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagCodatID">Constant Field Values</A></DL></DL><HR><A NAME="flagGenericID"><!-- --></A><H3>flagGenericID</H3><PRE>public static final byte <B>flagGenericID</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagGenericID">Constant Field Values</A></DL></DL><HR><A NAME="flagsOffset"><!-- --></A><H3>flagsOffset</H3><PRE>public static final int <B>flagsOffset</B></PRE><DL><DD>location of the byte designating its type.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagsOffset">Constant Field Values</A></DL></DL><HR><A NAME="dataOffset"><!-- --></A><H3>dataOffset</H3><PRE>public static final int <B>dataOffset</B></PRE><DL><DD>location of the byte where the data starts.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.dataOffset">Constant Field Values</A></DL></DL><HR><A NAME="nullBinaryID"><!-- --></A><H3>nullBinaryID</H3><PRE>public static final <A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html" title="class in net.jxta.impl.id.binaryID">BinaryID</A> <B>nullBinaryID</B></PRE><DL><DL></DL></DL><HR><A NAME="encodedValue"><!-- --></A><H3>encodedValue</H3><PRE>protected java.lang.String <B>encodedValue</B></PRE><DL><DD>Array that holds the length and the value of the id in base64 format. This is the default format rather than binary byte because it saves time converting. Odds of returning the actual binary are low so it is done on demand only. Callers of the toByteArray() method should consider the cost of decoding if it is to be called often.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="BinaryID()"><!-- --></A><H3>BinaryID</H3><PRE>public <B>BinaryID</B>()</PRE><DL><DD>Creates a null value ID.<P></DL><HR><A NAME="BinaryID(byte)"><!-- --></A><H3>BinaryID</H3><PRE>public <B>BinaryID</B>(byte&nbsp;id)</PRE><DL><DD>Creates zero content ID of a specific type.<P></DL><HR><A NAME="BinaryID(java.lang.String)"><!-- --></A><H3>BinaryID</H3><PRE>protected <B>BinaryID</B>(java.lang.String&nbsp;encodedValue)</PRE><DL><DD>Creates a ID from a string. Note that the ID is not currently validated.<P><DT><B>Parameters:</B><DD><CODE>encodedValue</CODE> - Value to convert ID.</DL><HR><A NAME="BinaryID(byte, byte[], boolean)"><!-- --></A><H3>BinaryID</H3><PRE>public <B>BinaryID</B>(byte&nbsp;type,                byte[]&nbsp;data,                boolean&nbsp;lengthIncluded)</PRE><DL><DD>Simple constructor that takes a binary array to signify the contents of the array.<P><DT><B>Parameters:</B><DD><CODE>type</CODE> - The Type of ID. Valid values: flagPeerGroupID,flagPeerID,flagPipeID,flagGenericID<DD><CODE>data</CODE> - the array of up to 256 bytes. Max is 256 if lengthIncluded is true or 255 if the first byte is the length-1.<DD><CODE>lengthIncluded</CODE> - Boolean that signifies if the first byte is the length of the bytes to follow.<DT><B>Throws:</B><DD><CODE>java.lang.RuntimeException</CODE> - Runtime exception trhown if array is not correct or if included, the array length does not match actual size.</DL><!-- ============ 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="toByteArray()"><!-- --></A><H3>toByteArray</H3><PRE>public byte[] <B>toByteArray</B>()</PRE><DL><DD>Returns the value of the ID as a binary array. This is always decoded from the base64 string rather than caching of the binary array. Callers of the toByteArray() method should consider the cost of decoding if the method is called often.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>returns the data part of the array.</DL></DD></DL><HR><A NAME="toSizeIncludedByteArray()"><!-- --></A><H3>toSizeIncludedByteArray</H3><PRE>public byte[] <B>toSizeIncludedByteArray</B>()</PRE><DL><DD>Returns the value of the ID as a binary array without the size in byte zero. This is always decoded from the base64 string rather than caching of the binary array. Callers of the toByteArray() method should consider the cost of decoding if the method is called often.<p> Note that we assume the array size-1 equals the contents of byte zero.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>returns the array with the first byte as the length of the remaining bytes.</DL></DD></DL><HR><A NAME="encodedValue()"><!-- --></A><H3>encodedValue</H3><PRE>public java.lang.String <B>encodedValue</B>()</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The ID which consists of a character designating type, followed by the base64 encoded value of the size and array of bytes.</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns the hash code of the BinaryID<p> WARNING: Do not use this hash as a network ID. Use a stronger digest hash like SHA-1 to get the hash of the contents.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>int hashcode</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object&nbsp;target)</PRE><DL><DD>Compares two BinaryIDs for equality.<p> true: taget == this<p>  false: target == null<p> true: taget.encodedValue == this.encodedValue<p> true: target instance of ID && ID==ID.nullID && nullBinaryID.encodedValue().equals( encodedValue())<p> false: all other posibilities<p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>target</CODE> - the BidaryID to be compared against.<DT><B>Returns:</B><DD>boolean true if IDs are equal, false otherwise.</DL></DD></DL><HR><A NAME="type()"><!-- --></A><H3>type</H3><PRE>public byte <B>type</B>()</PRE><DL><DD>Return the type of ID.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>byte value designating type.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Returns base 64 encoded value.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>String return value</DL></DD></DL><HR><A NAME="getID()"><!-- --></A><H3>getID</H3><PRE>public java.lang.String <B>getID</B>()</PRE><DL><DD>returns the raw encoded value. Not cloned because it is a string.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()</PRE><DL><DD>Clone this immutable object.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BinaryID.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryIDFactory.html" title="class in net.jxta.impl.id.binaryID"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="BinaryID.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

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