java.lang
Class Byte

java.lang.Object
  extended by java.lang.Byte

public final class Byte
extends Object

The Byte class is the standard wrapper for byte values.


Field Summary
static byte MAX_VALUE
           
static byte MIN_VALUE
           
 
Constructor Summary
Byte(byte value)
          Constructs a Byte object initialized to the specified byte value.
 
Method Summary
 byte byteValue()
          Returns the value of this Byte as a byte.
 boolean equals(Object obj)
          Compares this object to the specified object.
 int hashCode()
          Returns a hashcode for this Byte.
static byte parseByte(String s)
          Assuming the specified String represents a byte, returns that byte's value.
static byte parseByte(String s, int radix)
          Assuming the specified String represents a byte, returns that byte's value.
 String toString()
          Returns a String object representing this Byte's value.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final byte MAX_VALUE
See Also:
Constant Field Values

MIN_VALUE

public static final byte MIN_VALUE
See Also:
Constant Field Values
Constructor Detail

Byte

public Byte(byte value)
Constructs a Byte object initialized to the specified byte value.

Method Detail

byteValue

public byte byteValue()
Returns the value of this Byte as a byte.


equals

public boolean equals(Object obj)
Compares this object to the specified object. See also Object.equals(Object).

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hashcode for this Byte.

Overrides:
hashCode in class Object

parseByte

public static byte parseByte(String s)
                      throws NumberFormatException
Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte. The radix is assumed to be 10.

Throws:
NumberFormatException

parseByte

public static byte parseByte(String s,
                             int radix)
                      throws NumberFormatException
Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte.

Throws:
NumberFormatException

toString

public String toString()
Returns a String object representing this Byte's value.

Overrides:
toString in class Object