port EmailReplyParser to java