Parses the given byte using the given radix. @param __s The string to parse. @param __r The radix of the value. @return The parsed value. @throws NumberFormatException If the byte is not valid. @throws NullPointerException On null arguments. @since 2018/12/07
(String __s, int __r)
| 222 | * @since 2018/12/07 |
| 223 | */ |
| 224 | public static byte parseByte(String __s, int __r) |
| 225 | throws NumberFormatException, NullPointerException |
| 226 | { |
| 227 | if (__s == null) |
| 228 | throw new NullPointerException("NARG"); |
| 229 | |
| 230 | // {@squirreljme.error ZZ3f Byte value out of range.} |
| 231 | int val = Integer.parseInt(__s, __r); |
| 232 | if (val < MIN_VALUE || val > MAX_VALUE) |
| 233 | throw new NumberFormatException("ZZ3f"); |
| 234 | |
| 235 | return (byte)val; |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Parses the given string to a byte. |