All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.lang.Byte

java.lang.Object
   |
   +----java.lang.Number
           |
           +----java.lang.Byte

public final class Byte
extends Number
The Byte class is the standard wrapper for byte values.

See Also:
Number

Variable Index

 o MAX_VALUE
The maximum value a Byte can have.
 o MIN_VALUE
The minimum value a Byte can have.
 o TYPE
The Class object representing the primitive type byte.

Constructor Index

 o Byte(byte)
Constructs a Byte object initialized to the specified byte value.
 o Byte(String)
Constructs a Byte object initialized to the value specified by the String parameter.

Method Index

 o byteValue()
Returns the value of this Byte as a byte.
 o decode(String)
Decodes a String into a Byte.
 o doubleValue()
Returns the value of this Byte as a double.
 o equals(Object)
Compares this object to the specified object.
 o floatValue()
Returns the value of this Byte as a float.
 o hashCode()
Returns a hashcode for this Byte.
 o intValue()
Returns the value of this Byte as an int.
 o longValue()
Returns the value of this Byte as a long.
 o parseByte(String)
Assuming the specified String represents a byte, returns that byte's value.
 o parseByte(String, int)
Assuming the specified String represents a byte, returns that byte's value.
 o shortValue()
Returns the value of this Byte as a short.
 o toString()
Returns a String object representing this Byte's value.
 o toString(byte)
Returns a new String object representing the specified Byte.
 o valueOf(String)
Assuming the specified String represents a byte, returns a new Byte object initialized to that value.
 o valueOf(String, int)
Assuming the specified String represents a byte, returns a new Byte object initialized to that value.

Variables

 o MIN_VALUE
Properties Public Constant 
   MIN_VALUE=byte 
The minimum value a Byte can have.

 o MAX_VALUE
Properties Public Constant 
   MAX_VALUE=byte 
The maximum value a Byte can have.

 o TYPE
Properties Public Constant 
    TYPE=Class 
The Class object representing the primitive type byte.

Constructors

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

Parameters:
value - the initial value of the Byte
 o Byte
    method Byte(s=String) public Signals NumberFormatException
Constructs a Byte object initialized to the value specified by the String parameter. The radix is assumed to be 10.

Parameters:
s - the String to be converted to a Byte
Throws: NumberFormatException
If the String does not contain a parsable byte.

Methods

 o toString
    method toString(b=byte) returns String public  static   
Returns a new String object representing the specified Byte. The radix is assumed to be 10.

Parameters:
b - the byte to be converted
 o parseByte
    method parseByte(s=String) returns byte public  static   Signals 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.

Parameters:
s - the String containing the byte
Throws: NumberFormatException
If the string does not contain a parsable byte.
 o parseByte
    method parseByte(s=String, -
                     radix=int) returns byte public  static   Signals 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.

Parameters:
s - the String containing the byte
radix - the radix to be used
Throws: NumberFormatException
If the String does not contain a parsable byte.
 o valueOf
    method valueOf(s=String, -
                   radix=int) returns Byte public  static   Signals NumberFormatException
Assuming the specified String represents a byte, returns a new Byte object initialized to that value. Throws an exception if the String cannot be parsed as a byte.

Parameters:
s - the String containing the integer
radix - the radix to be used
Throws: NumberFormatException
If the String does not contain a parsable byte.
 o valueOf
    method valueOf(s=String) returns Byte public  static   Signals NumberFormatException
Assuming the specified String represents a byte, returns a new Byte object initialized to that value. Throws an exception if the String cannot be parsed as a byte. The radix is assumed to be 10.

Parameters:
s - the String containing the integer
Throws: NumberFormatException
If the String does not contain a parsable byte.
 o decode
    method decode(nm=String) returns Byte public  static   Signals NumberFormatException
Decodes a String into a Byte. The String may represent decimal, hexadecimal, and octal numbers.

Parameters:
nm - the string to decode
 o byteValue
    method byteValue() returns byte public     
Returns the value of this Byte as a byte.

Overrides:
byteValue in class Number
 o shortValue
    method shortValue() returns short public     
Returns the value of this Byte as a short.

Overrides:
shortValue in class Number
 o intValue
    method intValue() returns int public     
Returns the value of this Byte as an int.

Overrides:
intValue in class Number
 o longValue
    method longValue() returns long public     
Returns the value of this Byte as a long.

Overrides:
longValue in class Number
 o floatValue
    method floatValue() returns float public     
Returns the value of this Byte as a float.

Overrides:
floatValue in class Number
 o doubleValue
    method doubleValue() returns double public     
Returns the value of this Byte as a double.

Overrides:
doubleValue in class Number
 o toString
    method toString() returns String public     
Returns a String object representing this Byte's value.

Overrides:
toString in class Object
 o hashCode
    method hashCode() returns int public     
Returns a hashcode for this Byte.

Overrides:
hashCode in class Object
 o equals
    method equals(obj=Object) returns boolean public     
Compares this object to the specified object.

Parameters:
obj - the object to compare with
Returns:
true if the objects are the same; false otherwise.
Overrides:
equals in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index