src/share/classes/java/lang/Byte.java

Print this page

        

*** 108,119 **** * radix specified by the second argument. The characters in the * string must all be digits, of the specified radix (as * determined by whether {@link java.lang.Character#digit(char, * int)} returns a nonnegative value) except that the first * character may be an ASCII minus sign {@code '-'} ! * (<code>'&#92;u002D'</code>) to indicate a negative value or an ! * ASCII plus sign {@code '+'} (<code>'&#92;u002B'</code>) to * indicate a positive value. The resulting {@code byte} value is * returned. * * <p>An exception of type {@code NumberFormatException} is * thrown if any of the following situations occurs: --- 108,119 ---- * radix specified by the second argument. The characters in the * string must all be digits, of the specified radix (as * determined by whether {@link java.lang.Character#digit(char, * int)} returns a nonnegative value) except that the first * character may be an ASCII minus sign {@code '-'} ! * ({@code '\u005Cu002D'}) to indicate a negative value or an ! * ASCII plus sign {@code '+'} ({@code '\u005Cu002B'}) to * indicate a positive value. The resulting {@code byte} value is * returned. * * <p>An exception of type {@code NumberFormatException} is * thrown if any of the following situations occurs:
*** 125,136 **** * java.lang.Character#MIN_RADIX} or larger than {@link * java.lang.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>'&#92;u002D'</code>) or plus sign ! * {@code '+'} (<code>'&#92;u002B'</code>) provided that the * string is longer than length 1. * * <li> The value represented by the string is not a value of type * {@code byte}. * </ul> --- 125,136 ---- * java.lang.Character#MIN_RADIX} or larger than {@link * java.lang.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 '\u005Cu002D'}) or plus sign ! * {@code '+'} ({@code '\u005Cu002B'}) provided that the * string is longer than length 1. * * <li> The value represented by the string is not a value of type * {@code byte}. * </ul>
*** 155,167 **** /** * Parses the string argument as a signed decimal {@code * byte}. The characters in the string must all be decimal digits, * except that the first character may be an ASCII minus sign ! * {@code '-'} (<code>'&#92;u002D'</code>) to indicate a negative * value or an ASCII plus sign {@code '+'} ! * (<code>'&#92;u002B'</code>) to indicate a positive value. The * resulting {@code byte} value is returned, exactly as if the * argument and the radix 10 were given as arguments to the {@link * #parseByte(java.lang.String, int)} method. * * @param s a {@code String} containing the --- 155,167 ---- /** * Parses the string argument as a signed decimal {@code * byte}. The characters in the string must all be decimal digits, * except that the first character may be an ASCII minus sign ! * {@code '-'} ({@code '\u005Cu002D'}) to indicate a negative * value or an ASCII plus sign {@code '+'} ! * ({@code '\u005Cu002B'}) to indicate a positive value. The * resulting {@code byte} value is returned, exactly as if the * argument and the radix 10 were given as arguments to the {@link * #parseByte(java.lang.String, int)} method. * * @param s a {@code String} containing the