public static byte parseByte(byte[] bytes, int start, int length, int radix, boolean trim) {
    int intValue = LazyInteger.parseInt(bytes, start, length, radix, trim);
    byte result = (byte) intValue;
    if (result == intValue) {
      return result;
    }
    throw new NumberFormatException();
  }
Parses the string argument as if it was a byte value and returns the
result. Throws NumberFormatException if the string does not represent a
single byte quantity. The second argument specifies the radix to use when
parsing the value.

@param bytes
@param start
@param length
         a UTF-8 encoded string representation of a single byte quantity.
@param radix
         the radix to use when parsing.
@param trim
         whether to trim leading/trailing whitespace
@return byte the value represented by the argument
@throws NumberFormatException
          if the argument could not be parsed as a byte quantity.
serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyByte.java