发送报警邮件，邮件名称，发送人，接收人在constants中定义

@param content 邮件内容

@return
542552
private boolean sendErrorMail(String content, String title) {

        String localName = "";

        try {

            InetAddress addr = InetAddress.getLocalHost();
            localName = addr.getHostName().toString();

        } catch (UnknownHostException e) {

            LOG.warn("When send alarm mail,we can't get hostname", e);
        }

        String mailTitle = localName + " /" + ALARM_MAIL_TITLE + "/" + getSystemDate();

        int len = 0;
        int lenLimit = ALARM_MAIL_TITLE_LENGTH;
        if (title != null) {
            len = title.length();
            if (len > lenLimit) {
                len = lenLimit;
            }
            mailTitle += title.substring(0, len);
        }

        String mailTo = emailProperties.getEmailReceiver();
        String mailFrom = emailProperties.getFromEmail();
        String[] mailToList = mailTo.split(";");

        if (content == null) {

            return false;

        } else {

            try {
                mailBean.sendHtmlMail(mailFrom, mailToList, mailTitle, content);
            } catch (Exception e) {
                LOG.warn("When send alarm mail,we can't send it", e);
                return false;
            }
        }
        return true;
    }
367526
public static List<String> asListLines(String content) {
    List<String> retorno = new ArrayList<String>();
    content = content.replace(CARRIAGE_RETURN, RETURN);
    content = content.replace(RETURN, CARRIAGE_RETURN);
    for (String str : content.split(CARRIAGE_RETURN)) {
      retorno.add(str);
    }
    return retorno;
  }
468750
private static String guessEncodingByNutch(byte[] content) {
        int length = Math.min(content.length, CHUNK_SIZE);

        String str = "";
        try {
            str = new String(content, "ascii");
        } catch (UnsupportedEncodingException e) {
            return null;
        }

        Matcher metaMatcher = metaPattern.matcher(str);
        String encoding = null;
        if (metaMatcher.find()) {
            Matcher charsetMatcher = charsetPattern.matcher(metaMatcher.group(1));
            if (charsetMatcher.find()) {
                encoding = new String(charsetMatcher.group(1));
            }
        }
        if (encoding == null) {
            metaMatcher = charsetPatternHTML5.matcher(str);
            if (metaMatcher.find()) {
                encoding = new String(metaMatcher.group(1));
            }
        }
        if (encoding == null) {
            if (length >= 3 && content[0] == (byte) 0xEF
                    && content[1] == (byte) 0xBB && content[2] == (byte) 0xBF) {
                encoding = "UTF-8";
            } else if (length >= 2) {
                if (content[0] == (byte) 0xFF && content[1] == (byte) 0xFE) {
                    encoding = "UTF-16LE";
                } else if (content[0] == (byte) 0xFE
                        && content[1] == (byte) 0xFF) {
                    encoding = "UTF-16BE";
                }
            }
        }

        return encoding;
    }
838986
private static Object getValue(String content) {
        InjectionPattern injectionPattern = getInjectionPattern(content);
        Object value = null;
        if (injectionPattern != null) {
            // Use key of injectionPattern to get value from both environment variables and "values.yaml"
            Object envValue = typeCast(System.getenv(injectionPattern.getKey()));
            Map<String, Object> valueMap = Config.getInstance().getJsonMapConfig(CENTRALIZED_MANAGEMENT);
            Object fileValue = (valueMap != null) ? valueMap.get(injectionPattern.getKey()) : null;
            // Return different value from different sources based on injection order defined before
            if ((INJECTION_ORDER_CODE.equals("2") && envValue != null) || (INJECTION_ORDER_CODE.equals("1") && fileValue == null)) {
                value = envValue;
            } else {
                value = fileValue;
            }
            // Return default value when no matched value found from environment variables and "values.yaml"
            if (value == null || value.equals("")) {
                value = typeCast(injectionPattern.getDefaultValue());
                // Throw exception when error text provided
                if (value == null || value.equals("")) {
                    String error_text = injectionPattern.getErrorText();
                    if (error_text != null && !error_text.equals("")) {
                        throw new ConfigException(error_text);
                    }
                }
            }
            // Throw exception when no parsing result found
            if (value == null && valueMap != null && !valueMap.containsKey(injectionPattern.getKey())) {
                throw new ConfigException("\"${" + content + "}\" appears in config file cannot be expanded");
            }
        }
        return value;
    }
118293
public static String removeHtmlTag(String content, boolean withTagContent, String... tagNames) {
		String regex = null;
		for (String tagName : tagNames) {
			if (StrUtil.isBlank(tagName)) {
				continue;
			}
			tagName = tagName.trim();
			// (?i)表示其后面的表达式忽略大小写
			if (withTagContent) {
				// 标签及其包含内容
				regex = StrUtil.format("(?i)<{}\\s*?[^>]*?/?>(.*?</{}>)?", tagName, tagName);
			} else {
				// 标签不包含内容
				regex = StrUtil.format("(?i)<{}\\s*?[^>]*?>|</{}>", tagName, tagName);
			}

			content = ReUtil.delAll(regex, content); // 非自闭标签小写
		}
		return content;
	}
968867
public @NonNull TextComponent content(final @NonNull String content) {
    return new TextComponent(this.children, this.color, this.obfuscated, this.bold, this.strikethrough, this.underlined, this.italic, this.clickEvent, this.hoverEvent, this.insertion, requireNonNull(content, "content"));
  }
138179
public JSONArray getJSONMeasures(String content){
		JSONArray ja = new JSONArray();
		
		for(Entry<String, String> measure : measureRegexps.entrySet()){
			Pattern r = Pattern.compile(measure.getValue());
			Matcher m = r.matcher(content);
			if(m.find()){
				JSONObject jsonMeasure = new JSONObject();
				jsonMeasure.put(measure.getKey(), m.group(1));
				ja.add(jsonMeasure);
			}
		}

		return ja;
	}
343757
public static String encodeXMLEntityQuote(final String content) {
		StringBuffer encoded = new StringBuffer(content);
		replaceAll(encoded,"amp","&#38;#38;");
		replaceAll(encoded,"apos","&#39;");
		replaceAll(encoded,"<","&#38;#60;");
		replaceAll(encoded,"gt","&#62;");
		replaceAll(encoded,"quot","&#34;");
		return encoded.toString();
	}
1200372
public static String encryptToBase64(String content) {
        byte[] val = content.getBytes(CHARSET);
        return DatatypeConverter.printBase64Binary(val);
    }
724562
private String convertOutputToHtml(String content) {

        if (content.length() == 0) {
            return "";
        }
        StringBuilder buffer = new StringBuilder();
        for (String line : content.split("\n")) {
            buffer.append(CmsEncoder.escapeXml(line) + "<br>");
        }
        return buffer.toString();
    }
185283
public String getMatch(final byte[] content) throws IOException {
		final ByteBuffer buf = readBuffer(content);
		if (buf == null) {
			return null;
		}
		buf.position(0);
		final boolean matches = match(buf);
		if (matches) {
			final int subLen = this.subEntries.size();
			final String myMimeType = getMimeType();
			if (subLen > 0) {
				String mtype = null;
				for (int k = 0; k < subLen; k++) {
					final MagicMimeEntry me = this.subEntries.get(k);
					mtype = me.getMatch(content);
					if (mtype != null) {
						return mtype;
					}
				}
				if (myMimeType != null) {
					return myMimeType;
				}
			} else {
				return myMimeType;
			}
		}

		return null;
	}
207274
public static String tag(String tag, String... content) {
		return openTag(tag, null, null, content) + closeTag(tag);
	}
827696
private String parseFieldName(List<String> content) {
        String line = parseFieldDefinition(content);
        String[] parts = line.split(" ");
        String last = parts[parts.length - 1];
        if (last.endsWith(";") && last.length() > 1) {
            return last.substring(0, last.length() - 1);
        }
        throw new BeanCodeGenException(
            "Unable to locate field name at line " + (propertyIndex + 1), beanParser.getFile(), propertyIndex + 1);
    }
592441
public int getTabIndex(final WComponent content) {
		List<WTab> tabs = getTabs();
		final int count = tabs.size();

		for (int i = 0; i < count; i++) {
			WTab tab = tabs.get(i);

			if (content == tab.getContent()) {
				return i;
			}
		}

		return -1;
	}
3001
public static <T> T map(byte[] content, Class<T> genericType, Charset charset) {
        // 获取映射对象
        ObjectMetaData objectMap = getObjectMap(genericType);
        if (LOGGER.isDebugEnabled()) {
            objectMap.dumpObjectMetaData();
        }

        try {
            return mapByIndex(content, genericType, objectMap, charset);
        } catch (InstantiationException ie) {
            LOGGER.debug("Cannot instantiate: ", ie);
            throw new FdfsColumnMapException(ie);
        } catch (IllegalAccessException iae) {
            LOGGER.debug("Illegal access: ", iae);
            throw new FdfsColumnMapException(iae);
        } catch (InvocationTargetException ite) {
            LOGGER.debug("Cannot invoke method: ", ite);
            throw new FdfsColumnMapException(ite);
        }
    }
285946
public static UniversalIdStrQueueMessage newInstance(String content) {
        UniversalIdStrQueueMessage msg = newInstance();
        msg.setContent(content);
        return msg;
    }
777643
public static String[] validateObject(ParaObject content) {
		if (content == null) {
			return new String[]{"Object cannot be null."};
		}
		LinkedList<String> list = new LinkedList<>();
		try {
			for (ConstraintViolation<ParaObject> constraintViolation : getValidator().validate(content)) {
				String prop = "'".concat(constraintViolation.getPropertyPath().toString()).concat("'");
				list.add(prop.concat(" ").concat(constraintViolation.getMessage()));
			}
		} catch (Exception e) {
			logger.error(null, e);
		}
		return list.toArray(new String[]{});
	}