< prev index next >

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

Print this page
rev 60127 : 8249205: Remove unnecessary trademark symbols


 273      * Accepts decimal, hexadecimal, and octal numbers given by
 274      * the following grammar:
 275      *
 276      * <blockquote>
 277      * <dl>
 278      * <dt><i>DecodableString:</i>
 279      * <dd><i>Sign<sub>opt</sub> DecimalNumeral</i>
 280      * <dd><i>Sign<sub>opt</sub></i> {@code 0x} <i>HexDigits</i>
 281      * <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
 282      * <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
 283      * <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
 284      *
 285      * <dt><i>Sign:</i>
 286      * <dd>{@code -}
 287      * <dd>{@code +}
 288      * </dl>
 289      * </blockquote>
 290      *
 291      * <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
 292      * are as defined in section 3.10.1 of
 293      * <cite>The Java&trade; Language Specification</cite>,
 294      * except that underscores are not accepted between digits.
 295      *
 296      * <p>The sequence of characters following an optional
 297      * sign and/or radix specifier ("{@code 0x}", "{@code 0X}",
 298      * "{@code #}", or leading zero) is parsed as by the {@code
 299      * Byte.parseByte} method with the indicated radix (10, 16, or 8).
 300      * This sequence of characters must represent a positive value or
 301      * a {@link NumberFormatException} will be thrown.  The result is
 302      * negated if first character of the specified {@code String} is
 303      * the minus sign.  No whitespace characters are permitted in the
 304      * {@code String}.
 305      *
 306      * @param     nm the {@code String} to decode.
 307      * @return   a {@code Byte} object holding the {@code byte}
 308      *          value represented by {@code nm}
 309      * @throws  NumberFormatException  if the {@code String} does not
 310      *            contain a parsable {@code byte}.
 311      * @see java.lang.Byte#parseByte(java.lang.String, int)
 312      */
 313     public static Byte decode(String nm) throws NumberFormatException {




 273      * Accepts decimal, hexadecimal, and octal numbers given by
 274      * the following grammar:
 275      *
 276      * <blockquote>
 277      * <dl>
 278      * <dt><i>DecodableString:</i>
 279      * <dd><i>Sign<sub>opt</sub> DecimalNumeral</i>
 280      * <dd><i>Sign<sub>opt</sub></i> {@code 0x} <i>HexDigits</i>
 281      * <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
 282      * <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
 283      * <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
 284      *
 285      * <dt><i>Sign:</i>
 286      * <dd>{@code -}
 287      * <dd>{@code +}
 288      * </dl>
 289      * </blockquote>
 290      *
 291      * <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
 292      * are as defined in section 3.10.1 of
 293      * <cite>The Java Language Specification</cite>,
 294      * except that underscores are not accepted between digits.
 295      *
 296      * <p>The sequence of characters following an optional
 297      * sign and/or radix specifier ("{@code 0x}", "{@code 0X}",
 298      * "{@code #}", or leading zero) is parsed as by the {@code
 299      * Byte.parseByte} method with the indicated radix (10, 16, or 8).
 300      * This sequence of characters must represent a positive value or
 301      * a {@link NumberFormatException} will be thrown.  The result is
 302      * negated if first character of the specified {@code String} is
 303      * the minus sign.  No whitespace characters are permitted in the
 304      * {@code String}.
 305      *
 306      * @param     nm the {@code String} to decode.
 307      * @return   a {@code Byte} object holding the {@code byte}
 308      *          value represented by {@code nm}
 309      * @throws  NumberFormatException  if the {@code String} does not
 310      *            contain a parsable {@code byte}.
 311      * @see java.lang.Byte#parseByte(java.lang.String, int)
 312      */
 313     public static Byte decode(String nm) throws NumberFormatException {


< prev index next >