class EmailAddressResultParser extends ResultParser {

  private static final Pattern COMMA = Pattern.compile(",");

  @Override
  public EmailAddressParsedResult parse(Result result) {<FILL_FUNCTION_BODY>}

}

    String rawText = getMassagedText(result);
    if (rawText.startsWith("mailto:") || rawText.startsWith("MAILTO:")) {
      // If it starts with mailto:, assume it is definitely trying to be an email address
      String hostEmail = rawText.substring(7);
      int queryStart = hostEmail.indexOf('?');
      if (queryStart >= 0) {
        hostEmail = hostEmail.substring(0, queryStart);
      }
      try {
        hostEmail = urlDecode(hostEmail);
      } catch (IllegalArgumentException iae) {
        return null;
      }
      String[] tos = null;
      if (!hostEmail.isEmpty()) {
        tos = COMMA.split(hostEmail);
      }
      Map<String,String> nameValues = parseNameValuePairs(rawText);
      String[] ccs = null;
      String[] bccs = null;
      String subject = null;
      String body = null;
      if (nameValues != null) {
        if (tos == null) {
          String tosString = nameValues.get("to");
          if (tosString != null) {
            tos = COMMA.split(tosString);
          }
        }
        String ccString = nameValues.get("cc");
        if (ccString != null) {
          ccs = COMMA.split(ccString);
        }
        String bccString = nameValues.get("bcc");
        if (bccString != null) {
          bccs = COMMA.split(bccString);
        }
        subject = nameValues.get("subject");
        body = nameValues.get("body");
      }
      return new EmailAddressParsedResult(tos, ccs, bccs, subject, body);
    } else {
      if (!EmailDoCoMoResultParser.isBasicallyValidEmailAddress(rawText)) {
        return null;
      }
      return new EmailAddressParsedResult(rawText);
    }
  
<methods>public non-sealed void <init>() ,public abstract com.google.zxing.client.result.ParsedResult parse(com.google.zxing.Result) ,public static com.google.zxing.client.result.ParsedResult parseResult(com.google.zxing.Result) <variables>private static final java.util.regex.Pattern AMPERSAND,private static final java.lang.String BYTE_ORDER_MARK,private static final java.util.regex.Pattern DIGITS,static final java.lang.String[] EMPTY_STR_ARRAY,private static final java.util.regex.Pattern EQUALS,private static final com.google.zxing.client.result.ResultParser[] PARSERS