protected String getByteValue(String altValue, String defaultVal) {
    if (altValue != null && altValue.length() > 0) {
      try {
        byte[] b = new byte[1];
        b[0] = Byte.parseByte(altValue);
        return new String(b);
      } catch (NumberFormatException e) {
        return altValue;
      }
    }
    return defaultVal;
  }
Split the line based on a complex regex pattern.

@param line
         the current row
@param p
         the pattern for matching fields in the row
@return List of Strings - not including the separator in them
serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java