code: public byte nextByte(int radix) {
          // Check cached result
          if ((typeCache != null) && (typeCache instanceof Byte)
              && this.radix == radix) {
              byte val = ((Byte)typeCache).byteValue();
              useTypeCache();
              return val;
          }
          setRadix(radix);
          clearCaches();
          // Search for next byte
          try {
              String s = next(integerPattern());
              if (matcher.group(SIMPLE_GROUP_INDEX) == null)
                  s = processIntegerToken(s);
              return Byte.parseByte(s, radix);
          } catch (NumberFormatException nfe) {
              position = matcher.start(); // don't skip bad token
              throw new InputMismatchException(nfe.getMessage());
          }
      }
docs: Scans the next token of the input as a <tt>byte</tt>.
  This method will throw <code>InputMismatchException</code>
  if the next token cannot be translated into a valid byte value as
  described below. If the translation is successful, the scanner advances
  past the input that matched.
  
  <p> If the next token matches the <a
  href="#Integer-regex"><i>Integer</i></a> regular expression defined
  above then the token is converted into a <tt>byte</tt> value as if by
  removing all locale specific prefixes, group separators, and locale
  specific suffixes, then mapping non-ASCII digits into ASCII
  digits via {@link Character#digit Character.digit}, prepending a
  negative sign (-) if the locale specific negative prefixes and suffixes
  were present, and passing the resulting string to
  {@link Byte#parseByte(String, int) Byte.parseByte} with the
  specified radix.
  
  @param radix the radix used to interpret the token as a byte value
  @return the <tt>byte</tt> scanned from the input
  @throws InputMismatchException
  if the next token does not match the <i>Integer</i>
  regular expression, or is out of range
  @throws NoSuchElementException if input is exhausted
  @throws IllegalStateException if this scanner is closed