java.lang.Byte翻译

类别:Java 点击:0 评论:0 推荐:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2-rc) on Fri Jun 13 00:14:17 PDT 2003 -->
<TITLE>
Byte (Java 2 Platform SE v1.4.2)
</TITLE>

<META NAME="keywords" CONTENT="java.lang.Byte class">
<META NAME="keywords" CONTENT="MIN_VALUE">
<META NAME="keywords" CONTENT="MAX_VALUE">
<META NAME="keywords" CONTENT="TYPE">
<META NAME="keywords" CONTENT="toString()">
<META NAME="keywords" CONTENT="parseByte()">
<META NAME="keywords" CONTENT="valueOf()">
<META NAME="keywords" CONTENT="decode()">
<META NAME="keywords" CONTENT="byteValue()">
<META NAME="keywords" CONTENT="shortValue()">
<META NAME="keywords" CONTENT="intValue()">
<META NAME="keywords" CONTENT="longValue()">
<META NAME="keywords" CONTENT="floatValue()">
<META NAME="keywords" CONTENT="doubleValue()">
<META NAME="keywords" CONTENT="hashCode()">
<META NAME="keywords" CONTENT="equals()">
<META NAME="keywords" CONTENT="compareTo()">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="Byte (Java 2 Platform SE v1.4.2)";
}
</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>&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/Byte.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-files/index-1.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>
<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.4.2</b></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../java/lang/Boolean.html" title="class in java.lang"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../java/lang/Character.html" title="class in java.lang"><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="Byte.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_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
java.lang</FONT>
<BR>
Class Byte</H2>
<PRE>
<A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
  <IMG SRC="../../resources/inherit.gif" ALT="extended by"><A HREF="../../java/lang/Number.html" title="class in java.lang">java.lang.Number</A>
      <IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>java.lang.Byte</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../java/lang/Comparable.html" title="interface in java.lang">Comparable</A>, <A HREF="../../java/io/Serializable.html" title="interface in java.io">Serializable</A></DD>
</DL>
<HR>
<DL>
<DT>public final class <B>Byte</B><DT>extends <A HREF="../../java/lang/Number.html" title="class in java.lang">Number</A><DT>implements <A HREF="../../java/lang/Comparable.html" title="interface in java.lang">Comparable</A></DL>

<P>
The <code>Byte</code> class wraps a value of primitive type
 <code>byte</code> in an object.  An object of type
 <code>Byte</code> contains a single field whose type is
 <code>byte</code>.
 Byte类以对象的形式对简单类型byte进行包装,一个Byte类型的对象包含一个类型为byte的域。

 <p>

 In addition, this class provides several methods for converting a
 <code>byte</code> to a <code>String</code> and a <code>String</code>
 to a <code>byte</code>, as well as other constants and methods
 useful when dealing with a <code>byte</code>.
 而且,该类提供了很多将byte转化成String或者String转化成byte的方法,在处理byte时其他的一些常量和方法同样有用。
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>JDK1.1</DD>
<DT><B>See Also:</B><DD><A HREF="../../java/lang/Number.html" title="class in java.lang"><CODE>Number</CODE></A>,
<A HREF="../../serialized-form.html#java.lang.Byte">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&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#MAX_VALUE">MAX_VALUE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constant holding the maximum value a <code>byte</code> can
 have, 2<sup>7</sup>-1.常量,表示byte的最大值2<sup>7</sup>-1。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#MIN_VALUE">MIN_VALUE</A></B></CODE><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constant holding the minimum value a <code>byte</code> can
 have, -2<sup>7</sup>.常量,表示byte的最小值-2<sup>7</sup>-1。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../java/lang/Class.html" title="class in java.lang">Class</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#TYPE">TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The <code>Class</code> instance representing the primitive type
 <code>byte</code>.表示简单类型byte的Class实例。</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== 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><CODE><B><A HREF="../../java/lang/Byte.html#Byte(byte)">Byte</A></B>(byte&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a newly allocated <code>Byte</code> object that
 represents the specified <code>byte</code> value.创建一个表示指定byte值的Byte对象。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../java/lang/Byte.html#Byte(java.lang.String)">Byte</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a newly allocated <code>Byte</code> object that
 represents the <code>byte</code> value indicated by the
 <code>String</code> parameter.创建一个由String参数表示的byte值的Byte对象。</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#byteValue()">byteValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this <code>Byte</code> as a <code>byte</code>.以byte类型返回该Byte的值。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIG
="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#compareTo(java.lang.Byte)">compareTo</A></B>(<A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A>&nbsp;anotherByte)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares two <code>Byte</code> objects numerically.比较两个Byte对象数字上是否相等。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#compareTo(java.lang.Object)">compareTo</A></B>(<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A>&nbsp;o)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares this <code>Byte</code> object to another object.将该Byte对象和另一个对象比较。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#decode(java.lang.String)">decode</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;nm)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes a <code>String</code> into a <code>Byte</code>.将String类型转换成Byte类型。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#doubleValue()">doubleValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this <code>Byte</code> as a
 <code>double</code>.以double类型返回该Byte值。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A>&nbsp;obj)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares this object to the specified object.将该对象与指定对象相比较。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#floatValue()">floatValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this <code>Byte</code> as a
 <code>float</code>.以float类型返回该Byte值。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#hashCode()">hashCode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a hash code for this <code>Byte</code>.返回该Byte的hash码。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#intValue()">intValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this <code>Byte</code> as an
 <code>int</code>.以int类型返回该Byte值。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#longValue()">longValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this <code>Byte</code> as a
 <code>long</code>.以long类型返回该Byte值。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#parseByte(java.lang.String)">parseByte</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses the string argument as a signed decimal
 <code>byte</code>.将字符串参数作为带符号的十进制byte值进行转换。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#parseByte(java.lang.String, int)">parseByte</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
          int&nbsp;radix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses the string argument as a signed <code>byte</code> in the
 radix specified by the second argument.将字符串参数作为带符号的byte值进行转换,进制由第二个参数指定。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#shortValue()">shortValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of this <code>Byte</code> as a
 <code>short</code>.以long类型返回该Byte值。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>String</code> object representing this
 <code>Byte</code>'s value.返回该Byte值的字符串形式。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#toString(byte)">toString</A></B>(byte&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new <code>String</code> object representing the
 specified <code>byte</code>.返回指定byte值的字符串形式。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Byte</code> object holding the value
 given by the specified <code>String</code>.返回一Byte对象,值由指定的String参数确定。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/Byte.html#valueOf(java.lang.String, int)">valueOf</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
        int&nbsp;radix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Byte</code> object holding the value
 extracted from the specified <code>String</code> when parsed
 with the radix given by the second argument.返回一Byte对象,值由指定的String参数确定,进制由第二个参数确定。</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.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<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="MIN_VALUE"><!-- --></A><H3>
MIN_VALUE</H3>
<PRE>
public static final byte <B>MIN_VALUE</B></PRE>
<DL>
<DD>A constant holding the minimum value a <code>byte</code> can
 have, -2<sup>7</sup>.常量,表示byte的最小值-2<sup>7</sup>.。
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#java.lang.Byte.MIN_VALUE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="MAX_VALUE"><!-- --></A><H3>
MAX_VALUE</H3>
<PRE>
public static final byte <B>MAX_VALUE</B></PRE>
<DL>
<DD>A constant holding the maximum value a <code>byte</code> can
 have, 2<sup>7</sup>-1.常量,表示byte的最大值2<sup>7</sup>-1。
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#java.lang.Byte.MAX_VALUE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="TYPE"><!-- --></A><H3>
TYPE</H3>
<PRE>
public static final <A HREF="../../java/lang/Class.html" title="class in java.lang">Class</A> <B>TYPE</B></PRE>
<DL>
<DD>The <code>Class</code> instance representing the primitive type
 <code>byte</code>.表示简单类型byte的Class实例。
<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="Byte(byte)"><!-- --></A><H3>
Byte</H3>
<PRE>
public <B>Byte</B>(byte&nbsp;value)</PRE>
<DL>
<DD>Constructs a newly allocated <code>Byte</code> object that
 represents the specified <code>byte</code> value.创建一个表示指定byte值的Byte对象。
<P>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to be represented by the
   <code>Byte</code>.由Byte表示的值。</DL>
<HR>

<A NAME="Byte(java.lang.String)"><!-- --></A><H3>
Byte</H3>
<PRE>
public <B>Byte</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s)
     throws <A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Constructs a newly allocated <code>Byte</code> object that
 represents the <code>byte</code> value indicated by the
 <code>String</code> parameter. The string is converted to a
 <code>byte</code> value in exactly the manner used by the
 <code>parseByte</code> method for radix 10.
 创建一个由String参数表示的byte值的Byte对象,string被转换成byte值,相当于进制为10的方法parseByte。
<P>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the <code>String</code> to be converted to a
   <code>Byte</code>将被转换成Byte的String
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></CODE> - If the <code>String</code>
   does not contain a parsable <code>byte</code>.如果该String不能转换成byte<DT><B>See Also:</B><DD><A HREF="../../java/lang/Byte.html#parseByte(java.lang.String, int)"><CODE>parseByte(java.lang.String, int)</CODE></A></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="toString(byte)"><!-- --></A><H3>
toString</H3>
<PRE>
public static <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> <B>toString</B>(byte&nbsp;b)</PRE>
<DL>
<DD>Returns a new <code>String</code> object representing the
 specified <code>byte</code>. The radix is assumed to be 10.
 返回指定byte值的字符串形式,进制假定为10。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the <code>byte</code> to be converted被转换的byte
<DT><B>Returns:</B><DD>the string representation of the specified <code>byte</code>表示指定byte的字符串<DT><B>See Also:</B><DD><A HREF="../../java/lang/Integer.html#toString(int)"><CODE>Integer.toString(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="parseByte(java.lang.String)"><!-- --></A><H3>
parseByte</H3>
<PRE>
public static byte <B>parseByte</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s)
                      throws <A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Parses the string argument as a signed decimal
 <code>byte</code>. The characters in the string must all be
 decimal digits, except that the first character may be an ASCII
 minus sign <code>'-'</code> (<code>'&#92;u002D'</code>) to
 indicate a negative value. The resulting <code>byte</code> value is
 returned, exactly as if the argument and the radix 10 were
 given as arguments to the <A HREF="../../java/lang/Byte.html#parseByte(java.lang.String, int)"><CODE>parseByte(java.lang.String,
 int)</CODE></A> method.
 将字符串参数作为带符号的十进制byte值进行转换,字符串中的字符必须都是十进制数字,除了第一个字符可以为ACSII 减号‘-’('&#92;u002D')
 来表示负数。以byte值作为结果返回,相当于方法parseByte(java.lang.String,int),进制给定为10。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - a <code>String</code> containing the
                  <code>byte</code> representation to be parsed被用来转换成byte的String
<DT><B>Returns:</B><DD>the <code>byte</code> value represented by the
                  argument in decimal参数表示的byte值(十进制)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></CODE> - if the the string does not
   contain a parsable <code>byte</code>.如果字符串不能转换成byte值</DL>
</DD>
</DL>
<HR>

<A NAME="parseByte(java.lang.String, int)"><!-- --></A><H3>
parseByte</H3>
<PRE>
public static byte <B>parseByte</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
                             int&nbsp;radix)
                      throws <A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Parses the string argument as a signed <code>byte</code> in the
 radix specified by the second argument. The characters in the
 string must all be digits, of the specified radix (as
 determined by whether <A HREF="../../java/lang/Character.html#digit(char, int)"><CODE>Character.digit(char,
 int)</CODE></A> returns a nonnegative value) except that the first
 character may be an ASCII minus sign <code>'-'</code>
 (<code>'&#92;u002D'</code>) to indicate a negative value.  The
 resulting <code>byte</code> value is returned.
 将字符串参数作为带符号的byte值进行转换,进制由第二个参数确定。字符串中的字符必须都是十进制数字
 (可以由Character.digit(char,int)是否返回非负数来确定),
 除了第一个字符可以为ACSII 减号‘-’('\u002D') 来表示负数,结果返回byte值。
 <p>
 An exception of type <code>NumberFormatException</code> is
 thrown if any of the following situations occurs:
 如果下列情形之一发生时抛出NumberFormatException:
 <ul>
 <li> The first argument is <code>null</code> or is a string of
 length zero.第一个参数为null,或长度为0。

 <li> The radix is either smaller than <A HREF="../../java/lang/Character.html#MIN_RADIX"><CODE>Character.MIN_RADIX</CODE></A> or larger than <A HREF="../../java/lang/Character.html#MAX_RADIX"><CODE>Character.MAX_RADIX</CODE></A>.
进制比Character.MIN_RADIX小或者比Character.MAX_RADIX大。
 <li> Any character of the string is not a digit of the specified
 radix, except that the first character may be a minus sign
 <code>'-'</code> (<code>'&#92;u002D'</code>) provided that the
 string is longer than length 1.
 字符串中的任意字符不是指定进制的数字,长度大于1的字符串第一个字符可以为减号‘-’。

 <li> The value represented by the string is not a value of type
 <code>byte</code>.字符串表示的值不是一个byte类型的值。
 </ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the <code>String</code> containing the
   <code>byte</code>
                  representation to be parsed被用来转换成byte的String <DD><CODE>radix</CODE> - the radix to be used while parsing <code>s</code>转换s时使用的进制
<DT><B>Returns:</B><DD>the <code>byte</code> value represented by the string
                   argument in the specified radix 表示指定进制字符串的byte值
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></CODE> - If the string does
                  not contain a parsable <code>byte</code>.如果该字符串不能转换成byte。</DL>
</DD>
</DL>
<HR>

<A NAME="valueOf(java.lang.String, int)"><!-- --></A><H3>
valueOf</H3>
<PRE>
public static <A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A> <B>valueOf</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
                           int&nbsp;radix)
                    throws <A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Returns a <code>Byte</code> object holding the value
 extracted from the specified <code>String</code> when parsed
 with the radix given by the second argument. The first argument
 is interpreted as representing a signed <code>byte</code> in
 the radix specified by the second argument, exactly as if the
 argument were given to the <A HREF="../../java/lang/Byte.html#parseByte(java.lang.String, int)"><CODE>parseByte(java.lang.String,
 int)</CODE></A> method. The result is a <code>Byte</code> object that
 represents the <code>byte</code> value specified by the string.
 返回一Byte对象,值由指定的String参数确定,进制由第二个参数确定。第一个参数
 用来表示指定进制的带符号的值,进制由第二个参数指定,相当于方法parseByte(java.lang.String, int),返回
 一Byte对象,表示的byte值由字符串指定。
 <p> In other words, this method returns a <code>Byte</code> object
 equal to the value of:
 换言之,该方法返回等于该值的Byte对象:

 <blockquote><code>
 new Byte(Byte.parseByte(s, radix))
 </code></blockquote>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the string to be parsed 用来转换的字符串
<DD><CODE>radix</CODE> - the radix to be used in interpreting <code>s</code>用来说明s的进制
<DT><B>Returns:</B><DD>a <code>Byte</code> object holding the value
    represented by the string argument in the
   specified radix.表示指定进制字符串值的Byte对象。
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></CODE> - If the <code>String</code> does
   not contain a parsable <code>byte</code>.如果该字符串不能转换成byte。</DL>
</DD>
</DL>
<HR>

<A NAME="valueOf(java.lang.String)"><!-- --></A><H3>
valueOf</H3>
<PRE>
public static <A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A> <B>valueOf</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s)
                    throws <A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Returns a <code>Byte</code> object holding the value
 given by the specified <code>String</code>. The argument is
 interpreted as representing a signed decimal <code>byte</code>,
 exactly as if the argument were given to the <A HREF="../../java/lang/Byte.html#parseByte(java.lang.String)"><CODE>parseByte(java.lang.String)</CODE></A> method. The result is a
 <code>Byte</code> object that represents the <code>byte</code>
 value specified by the string. 
 返回一Byte对象,值由指定的String参数确定。第一个参数
 用来表示指定十进制的带符号的值,进制由第二个参数指定,相当于方法parseByte(java.lang.String),结果返回
 一Byte对象,表示的byte值由字符串指定。
 <p> In other words, this method
 returns a <code>Byte</code> object equal to the value of:
 换言之,该方法返回等于该值的Byte对象:

 <blockquote><code>
 new Byte(Byte.parseByte(s))
 </code></blockquote>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the string to be parsed用来转换的字符串
<DT><B>Returns:</B><DD>a <code>Byte</code> object holding the value
    represented by the string argument表示指定字符串值的Byte对象。
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></CODE> - If the <code>String</code> does
   not contain a parsable <code>byte</code>.如果该字符串不能转换成byte。</DL>
</DD>
</DL>
<HR>

<A NAME="decode(java.lang.String)"><!-- --></A><H3>
decode</H3>
<PRE>
public static <A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A> <B>decode</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;nm)
                   throws <A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></PRE>
<DL>
<DD>Decodes a <code>String</code> into a <code>Byte</code>.
 Accepts decimal, hexadecimal, and octal numbers given by
 the following grammar:
 将String转换成Byte。允许符合下列语法的十进制、十六进制和八进制的数字。

 <blockquote>
 <dl>
 <dt><i>DecodableString:</i>
 <dd><i>Sign<sub>opt</sub> DecimalNumeral</i>
 <dd><i>Sign<sub>opt</sub></i> <code>0x</code> <i>HexDigits</i>
 <dd><i>Sign<sub>opt</sub></i> <code>0X</code> <i>HexDigits</i>
 <dd><i>Sign<sub>opt</sub></i> <code>#</code> <i>HexDigits</i>
 <dd><i>Sign<sub>opt</sub></i> <code>0</code> <i>OctalDigits</i>
 <p>
 <dt><i>Sign:</i>
 <dd><code>-</code>
 </dl>
 </blockquote>

 <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
 are defined in <a href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">&sect;3.10.1</a>
 of the <a href="http://java.sun.com/docs/books/jls/html/">Java
 Language Specification</a>.
 十进制、十六进制和八进制数字在Java语言规范3.10.1中定义。
 <p>
 The sequence of characters following an (optional) negative
 sign and/or radix specifier (&quot;<code>0x</code>&quot;,
 &quot;<code>0X</code>&quot;, &quot;<code>#</code>&quot;, or
 leading zero) is parsed as by the <code>Byte.parseByte</code>
 method with the indicated radix (10, 16, or 8).  This sequence
 of characters must represent a positive value or a <A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang"><CODE>NumberFormatException</CODE></A> will be thrown.  The result is negated
 if first character of the specified <code>String</code> is the
 minus sign.  No whitespace characters are permitted in the
 <code>String</code>.字符串序列以负号(可选)或进制标识("0x", "0X", "#", 或者0开头,用Byte.parseByte方法按照指定的
 进制(10,16或者8)进行转换。该字符串序列应当表示正数否则抛出NumberFormatException,如果指定的String以‘-’开头,结果为负。String中不允许空白字符。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nm</CODE> - the <code>String</code> to decode. 用来转换的String。
<DT><B>Returns:</B><DD>a <code>Byte</code> object holding the <code>byte</code>
   value represented by <code>nm</code> 由nm表示byte值的Byte对象
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../java/lang/NumberFormatException.html" title="class in java.lang">NumberFormatException</A></CODE> - if the <code>String</code> does not
            contain a parsable <code>byte</code>.如果该字符串不能转换成byte。<DT><B>See Also:</B><DD><A HREF="../../java/lang/Byte.html#parseByte(java.lang.String, int)"><CODE>parseByte(java.lang.String, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="byteValue()"><!-- --></A><H3>
byteValue</H3>
<PRE>
public byte <B>byteValue</B>()</PRE>
<DL>
<DD>Returns the value of this <code>Byte</code> as a
 <code>byte</code>.以byte类型返回该Byte值。
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Number.html#byteValue()">byteValue</A></CODE> in class <CODE><A HREF="../../java/lang/Number.html" title="class in java.lang">Number</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the numeric value represented by this object after conversion
          to type <code>byte</code>.在该对象转换成byte类型后表示的数值。</DL>
</DD>
</DL>
<HR>

<A NAME="shortValue()"><!-- --></A><H3>
shortValue</H3>
<PRE>
public short <B>shortValue</B>()</PRE>
<DL>
<DD>Returns the value of this <code>Byte</code> as a
 <code>short</code>.以short类型返回该Byte值。
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Number.html#shortValue()">shortValue</A></CODE> in class <CODE><A HREF="../../java/lang/Number.html" title="class in java.lang">Number</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the numeric value represented by this object after conversion
          to type <code>short</code>.在该对象转换成short类型后表示的数值。</DL>
</DD>
</DL>
<HR>

<A NAME="intValue()"><!-- --></A><H3>
intValue</H3>
<PRE>
public int <B>intValue</B>()</PRE>
<DL>
<DD>Returns the value of this <code>Byte</code> as an
 <code>int</code>.以int类型返回该Byte值。
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../java/lang/Number.html#intValue()">intValue</A></CODE> in class <CODE><A HREF="../../java/lang/Number.html" title="class in java.lang">Number</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the numeric value represented by this object after conversion
          to type <code>int</code>.在该对象转换成int类型后表示的数值。</DL>
</DD>
</DL>
<HR>

<A NAME="longValue()"><!-- --></A><H3>
longValue</H3>
<PRE>
public long <B>longValue</B>()</PRE>
<DL>
<DD>Returns the value of this <code>Byte</code> as a
 <code>long</code>.以long类型返回该Byte值。
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../java/lang/Number.html#longValue()">longValue</A></CODE> in class <CODE><A HREF="../../java/lang/Number.html" title="class in java.lang">Number</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the numeric value represented by this object after conversion
          to type <code>long</code>.在该对象转换成long类型后表示的数值。</DL>
</DD>
</DL>
<HR>

<A NAME="floatValue()"><!-- --></A><H3>
floatValue</H3>
<PRE>
public float <B>floatValue</B>()</PRE>
<DL>
<DD>Returns the value of this <code>Byte</code> as a
 <code>float</code>.以float类型返回该Byte值。
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../java/lang/Number.html#floatValue()">floatValue</A></CODE> in class <CODE><A HREF="../../java/lang/Number.html" title="class in java.lang">Number</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the numeric value represented by this object after conversion
          to type <code>float</code>.在该对象转换成float类型后表示的数值。</DL>
</DD>
</DL>
<HR>

<A NAME="doubleValue()"><!-- --></A><H3>
doubleValue</H3>
<PRE>
public double <B>doubleValue</B>()</PRE>
<DL>
<DD>Returns the value of this <code>Byte</code> as a
 <code>double</code>.以double类型返回该Byte值。
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../java/lang/Number.html#doubleValue()">doubleValue</A></CODE> in class <CODE><A HREF="../../java/lang/Number.html" title="class in java.lang">Number</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the numeric value represented by this object after conversion
          to type <code>double</code>.在该对象转换成double类型后表示的数值。</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="../../java/lang/String.html" title="class in java.lang">String</A> <B>toString</B>()</PRE>
<DL>
<DD>Returns a <code>String</code> object representing this
 <code>Byte</code>'s value.  The value is converted to signed
 decimal representation and returned as a string, exactly as if
 the <code>byte</code> value were given as an argument to the
 <A HREF="../../java/lang/Byte.html#toString(byte)"><CODE>toString(byte)</CODE></A> method.
 返回该Byte值的字符串形式。该值转换成带符号的十进制形式,以字符串返回。和toString(byte)方法类似,byte值作为参数给出。
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a string representation of the value of this object in
          base&nbsp;10.该对象以10为基的字符串形式。</DL>
</DD>
</DL>
<HR>

<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>Returns a hash code for this <code>Byte</code>.返回该byte的hash码。
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a hash code value for this object.该对象的hash码值。<DT><B>See Also:</B><DD><A HREF="../../java/lang/Object.html#equals(java.lang.Object)"><CODE>Object.equals(java.lang.Object)</CODE></A>,
<A HREF="../../java/util/Hashtable.html" title="class in java.util"><CODE>Hashtable</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A>&nbsp;obj)</PRE>
<DL>
<DD>Compares this object to the specified object.  The result is
 <code>true</code> if and only if the argument is not
 <code>null</code> and is a <code>Byte</code> object that
 contains the same <code>byte</code> value as this object.
 将该对象与指定对象相比较。只有当参数不为null,是Byte对象,且值与该对象相等时结果为true。
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object to compare with用来比较的对象
<DT><B>Returns:</B><DD><code>true</code> if the objects are the same;
    <code>false</code> otherwise.如果对象相同,返回true,否则为false。<DT><B>See Also:</B><DD><A HREF="../../java/lang/Object.html#hashCode()"><CODE>Object.hashCode()</CODE></A>,
<A HREF="../../java/util/Hashtable.html" title="class in java.util"><CODE>Hashtable</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="compareTo(java.lang.Byte)"><!-- --></A><H3>
compareTo</H3>
<PRE>
public int <B>compareTo</B>(<A HREF="../../java/lang/Byte.html" title="class in java.lang">Byte</A>&nbsp;anotherByte)</PRE>
<DL>
<DD>Compares two <code>Byte</code> objects numerically.比较两个Byte对象数字上是否相等。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>anotherByte</CODE> - the <code>Byte</code> to be compared.用来比较的Byte
<DT><B>Returns:</B><DD>the value <code>0</code> if this <code>Byte</code> is
   equal to the argument <code>Byte</code>; a value less than
   <code>0</code> if this <code>Byte</code> is numerically less
   than the argument <code>Byte</code>; and a value greater than
    <code>0</code> if this <code>Byte</code> is numerically
    greater than the argument <code>Byte</code> (signed
    comparison).如果该Byte对象等于Byte参数,返回0,如果小于Byte参数,返回小于0的
    数,如果大于Byte参数,返回大于0的数(有符号比较)。<DT><B>Since:</B></DT>
  <DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>
compareTo</H3>
<PRE>
public int <B>compareTo</B>(<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A>&nbsp;o)</PRE>
<DL>
<DD>Compares this <code>Byte</code> object to another object.  If the
 object is a <code>Byte</code>, this function behaves like
 <code>compareTo(Byte)</code>.  Otherwise, it throws a
 <code>ClassCastException</code> (as <code>Byte</code> objects
 are only comparable to other <code>Byte</code> objects).
 将该Byte对象和另一个对象比较。如果该对象为Byte类型,方法按compareTo(Byte)执行,否则
 抛出ClassCastException(因为Byte对象只能与其他Byte对象比较)。
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../java/lang/Comparable.html#compareTo(java.lang.Object)">compareTo</A></CODE> in interface <CODE><A HREF="../../java/lang/Comparable.html" title="interface in java.lang">Comparable</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the <code>Object</code> to be compared.用来比较的对象。
<DT><B>Returns:</B><DD>the value <code>0</code> if the argument is a <code>Byte</code>
  numerically equal to this <code>Byte</code>; a value less than
  <code>0</code> if the argument is a <code>Byte</code>
  numerically greater than this <code>Byte</code>; and a
  value greater than <code>0</code> if the argument is a
   <code>Byte</code> numerically less than this
  <code>Byte</code>. 如果该参数是Byte类型,数值上等于该Byte对象,返回0,如果大于,返回小于0的数,如果小于,返回大于0的数。
<DT><B>Throws:</B>
<DD><CODE><code>ClassCastException</code></CODE> - if the argument is not a
    <code><code>Byte</code></code>.如果该参数不是Byte对象。<DT><B>Since:</B></DT>
  <DD>1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../java/lang/Comparable.html" title="interface in java.lang"><CODE>Comparable</CODE></A></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/Byte.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-files/index-1.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>
<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.4.2</b></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../java/lang/Boolean.html" title="class in java.lang"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../java/lang/Character.html" title="class in java.lang"><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="Byte.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>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="../../../relnotes/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../../../relnotes/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font>
</BODY>
</HTML>

本文地址:http://com.8s8s.com/it/it10836.htm