jdk/src/share/classes/java/lang/Byte.java
changeset 11676 7e75ec031b97
parent 11672 a5fa8c844b54
child 14503 0729d9e57ed5
equal deleted inserted replaced
11675:7559f1e43e1e 11676:7e75ec031b97
   108      * radix specified by the second argument. The characters in the
   108      * radix specified by the second argument. The characters in the
   109      * string must all be digits, of the specified radix (as
   109      * string must all be digits, of the specified radix (as
   110      * determined by whether {@link java.lang.Character#digit(char,
   110      * determined by whether {@link java.lang.Character#digit(char,
   111      * int)} returns a nonnegative value) except that the first
   111      * int)} returns a nonnegative value) except that the first
   112      * character may be an ASCII minus sign {@code '-'}
   112      * character may be an ASCII minus sign {@code '-'}
   113      * (<code>'&#92;u002D'</code>) to indicate a negative value or an
   113      * ({@code '\u005Cu002D'}) to indicate a negative value or an
   114      * ASCII plus sign {@code '+'} (<code>'&#92;u002B'</code>) to
   114      * ASCII plus sign {@code '+'} ({@code '\u005Cu002B'}) to
   115      * indicate a positive value.  The resulting {@code byte} value is
   115      * indicate a positive value.  The resulting {@code byte} value is
   116      * returned.
   116      * returned.
   117      *
   117      *
   118      * <p>An exception of type {@code NumberFormatException} is
   118      * <p>An exception of type {@code NumberFormatException} is
   119      * thrown if any of the following situations occurs:
   119      * thrown if any of the following situations occurs:
   125      * java.lang.Character#MIN_RADIX} or larger than {@link
   125      * java.lang.Character#MIN_RADIX} or larger than {@link
   126      * java.lang.Character#MAX_RADIX}.
   126      * java.lang.Character#MAX_RADIX}.
   127      *
   127      *
   128      * <li> Any character of the string is not a digit of the
   128      * <li> Any character of the string is not a digit of the
   129      * specified radix, except that the first character may be a minus
   129      * specified radix, except that the first character may be a minus
   130      * sign {@code '-'} (<code>'&#92;u002D'</code>) or plus sign
   130      * sign {@code '-'} ({@code '\u005Cu002D'}) or plus sign
   131      * {@code '+'} (<code>'&#92;u002B'</code>) provided that the
   131      * {@code '+'} ({@code '\u005Cu002B'}) provided that the
   132      * string is longer than length 1.
   132      * string is longer than length 1.
   133      *
   133      *
   134      * <li> The value represented by the string is not a value of type
   134      * <li> The value represented by the string is not a value of type
   135      * {@code byte}.
   135      * {@code byte}.
   136      * </ul>
   136      * </ul>
   155 
   155 
   156     /**
   156     /**
   157      * Parses the string argument as a signed decimal {@code
   157      * Parses the string argument as a signed decimal {@code
   158      * byte}. The characters in the string must all be decimal digits,
   158      * byte}. The characters in the string must all be decimal digits,
   159      * except that the first character may be an ASCII minus sign
   159      * except that the first character may be an ASCII minus sign
   160      * {@code '-'} (<code>'&#92;u002D'</code>) to indicate a negative
   160      * {@code '-'} ({@code '\u005Cu002D'}) to indicate a negative
   161      * value or an ASCII plus sign {@code '+'}
   161      * value or an ASCII plus sign {@code '+'}
   162      * (<code>'&#92;u002B'</code>) to indicate a positive value. The
   162      * ({@code '\u005Cu002B'}) to indicate a positive value. The
   163      * resulting {@code byte} value is returned, exactly as if the
   163      * resulting {@code byte} value is returned, exactly as if the
   164      * argument and the radix 10 were given as arguments to the {@link
   164      * argument and the radix 10 were given as arguments to the {@link
   165      * #parseByte(java.lang.String, int)} method.
   165      * #parseByte(java.lang.String, int)} method.
   166      *
   166      *
   167      * @param s         a {@code String} containing the
   167      * @param s         a {@code String} containing the