📄 binaryid.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>BinaryID (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.impl.id.binaryID.BinaryID class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="BinaryID (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BinaryID.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <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> <A HREF="BinaryID.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">net.jxta.impl.id.binaryID</FONT><BR>Class BinaryID</H2><PRE>java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>net.jxta.impl.id.binaryID.BinaryID</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD></DL><HR><DL><DT>public class <B>BinaryID</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL><P>A <code>BinaryID</code> is a 256-byte, identifier. This class should be immutable so that it is thread safe.<P><P><DL><DT><B>Author:</B></DT> <DD>Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a></DD><DT><B>See Also:</B><DD><A HREF="../../../../../net/jxta/id/ID.html" title="class in net.jxta.id"><CODE>ID</CODE></A>, <A HREF="../../../../../net/jxta/id/IDFactory.html" title="class in net.jxta.id"><CODE>IDFactory</CODE></A>, <CODE>net.jxta.impl.id.BinaryID.BinaryIDFactory</CODE>, <A HREF="../../../../../serialized-form.html#net.jxta.impl.id.binaryID.BinaryID">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#dataOffset">dataOffset</A></B></CODE><BR> location of the byte where the data starts.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#encodedValue">encodedValue</A></B></CODE><BR> Array that holds the length and the value of the id in base64 format. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagCodatID">flagCodatID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagGenericID">flagGenericID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagModuleClassID">flagModuleClassID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagModuleClassRoleID">flagModuleClassRoleID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagModuleSpecID">flagModuleSpecID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagPeerGroupID">flagPeerGroupID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagPeerID">flagPeerID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagPipeID">flagPipeID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagsOffset">flagsOffset</A></B></CODE><BR> location of the byte designating its type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#flagsSize">flagsSize</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html" title="class in net.jxta.impl.id.binaryID">BinaryID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#nullBinaryID">nullBinaryID</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#UUIDEncoded">UUIDEncoded</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#BinaryID()">BinaryID</A></B>()</CODE><BR> Creates a null value ID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#BinaryID(byte)">BinaryID</A></B>(byte id)</CODE><BR> Creates zero content ID of a specific type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#BinaryID(byte, byte[], boolean)">BinaryID</A></B>(byte type, byte[] data, boolean lengthIncluded)</CODE><BR> Simple constructor that takes a binary array to signify the contents of the array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#BinaryID(java.lang.String)">BinaryID</A></B>(java.lang.String encodedValue)</CODE><BR> Creates a ID from a string. </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#clone()">clone</A></B>()</CODE><BR> Clone this immutable object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#encodedValue()">encodedValue</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object target)</CODE><BR> Compares two BinaryIDs for equality.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#getID()">getID</A></B>()</CODE><BR> returns the raw encoded value. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#hashCode()">hashCode</A></B>()</CODE><BR> Returns the hash code of the BinaryID WARNING: Do not use this hash as a network ID. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#toByteArray()">toByteArray</A></B>()</CODE><BR> Returns the value of the ID as a binary array. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#toSizeIncludedByteArray()">toSizeIncludedByteArray</A></B>()</CODE><BR> Returns the value of the ID as a binary array without the size in byte zero. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#toString()">toString</A></B>()</CODE><BR> Returns base 64 encoded value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/BinaryID.html#type()">type</A></B>()</CODE><BR> Return the type of ID.</TD></TR></TABLE> <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>finalize, getClass, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="UUIDEncoded"><!-- --></A><H3>UUIDEncoded</H3><PRE>public static java.lang.String <B>UUIDEncoded</B></PRE><DL><DL></DL></DL><HR><A NAME="flagsSize"><!-- --></A><H3>flagsSize</H3><PRE>public static final int <B>flagsSize</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.BinaryID.flagsSize">Constant Field Values</A></DL></DL><HR><A NAME="flagPeerGroupID"><!-- --></A><H3>flagPeerGroupID</H3><PRE>public static final byte <B>flagPeerGroupID</B></PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -