API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. Byte View Source
Author(s)
Nakul Saraiya
Since
JDK1.1
Version
1.41, 11/17/05
Serial
Hierarchy
 Object
      Number
          Byte
Implements
 Comparable
Subclasses
Description
publicfinal class Byte
  The Byte class wraps a value of primitive type byte in an object.
See also:    Number
Constructors
public Byte (byte value)
  Constructs a newly allocated Byte object that represents the specified byte value.
public Byte (String s) throws NumberFormatException
  Constructs a newly allocated Byte object that represents the byte value indicated by the String parameter.
Methods
Hide/Show inherited methods
public byte byteValue () [Overrides Number]
Returns the value of this Byte as a byte.
public int compareTo (Byte anotherByte)
  Compares two Byte objects numerically.
publicstatic Byte decode (String nm) throws NumberFormatException
  Decodes a String into a Byte.
public double doubleValue () [Specified in Number]
Returns the value of this Byte as a double.
public boolean equals (Object obj)
  Compares this object to the specified object.
public float floatValue () [Specified in Number]
Returns the value of this Byte as a float.
public int hashCode ()
Returns a hash code for this Byte.
public int intValue () [Specified in Number]
Returns the value of this Byte as an int.
public long longValue () [Specified in Number]
Returns the value of this Byte as a long.
publicstatic byte parseByte (String s) throws NumberFormatException
  Parses the string argument as a signed decimal byte.
publicstatic byte parseByte (String s, int radix) throws NumberFormatException
  Parses the string argument as a signed byte in the radix specified by the second argument.
public short shortValue () [Overrides Number]
Returns the value of this Byte as a short.
public String toString ()
  Returns a String object representing this Byte's value.
publicstatic String toString (byte b)
  Returns a new String object representing the specified byte.
publicstatic Byte valueOf (byte b)
  Returns a Byte instance representing the specified byte value.
publicstatic Byte valueOf (String s) throws NumberFormatException
  Returns a Byte object holding the value given by the specified String.
publicstatic Byte valueOf (String s, int radix) throws NumberFormatException
  Returns a Byte object holding the value extracted from the specified String when parsed with the radix given by the second argument.
Fields
Hide/Show inherited fields
publicfinalstatic byte MAX_VALUE = "127"
A constant holding the maximum value a byte can have, 27-1.
publicfinalstatic byte MIN_VALUE = "-128"
A constant holding the minimum value a byte can have, -27.
publicfinalstatic int SIZE = "8"
  The number of bits used to represent a byte value in two's complement binary form.
publicfinalstatic Class<Byte> TYPE
The Class instance representing the primitive type byte.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar