src/share/classes/java/lang/Byte.java
Print this page
*** 199,209 ****
* @throws NumberFormatException If the {@code String} does
* not contain a parsable {@code byte}.
*/
public static Byte valueOf(String s, int radix)
throws NumberFormatException {
! return new Byte(parseByte(s, radix));
}
/**
* Returns a {@code Byte} object holding the value
* given by the specified {@code String}. The argument is
--- 199,209 ----
* @throws NumberFormatException If the {@code String} does
* not contain a parsable {@code byte}.
*/
public static Byte valueOf(String s, int radix)
throws NumberFormatException {
! return valueOf(parseByte(s, radix));
}
/**
* Returns a {@code Byte} object holding the value
* given by the specified {@code String}. The argument is
*** 275,285 ****
public static Byte decode(String nm) throws NumberFormatException {
int i = Integer.decode(nm);
if (i < MIN_VALUE || i > MAX_VALUE)
throw new NumberFormatException(
"Value " + i + " out of range from input " + nm);
! return (byte)i;
}
/**
* The value of the {@code Byte}.
*
--- 275,285 ----
public static Byte decode(String nm) throws NumberFormatException {
int i = Integer.decode(nm);
if (i < MIN_VALUE || i > MAX_VALUE)
throw new NumberFormatException(
"Value " + i + " out of range from input " + nm);
! return valueOf((byte)i);
}
/**
* The value of the {@code Byte}.
*
*** 372,382 ****
*
* @return a string representation of the value of this object in
* base 10.
*/
public String toString() {
! return String.valueOf((int)value);
}
/**
* Returns a hash code for this {@code Byte}; equal to the result
* of invoking {@code intValue()}.
--- 372,382 ----
*
* @return a string representation of the value of this object in
* base 10.
*/
public String toString() {
! return Integer.toString((int)value);
}
/**
* Returns a hash code for this {@code Byte}; equal to the result
* of invoking {@code intValue()}.