public static String getCharSet(HttpEntity entity) {
	String code = CharSets.UTF_8;
	ContentType contentType = ContentType.getOrDefault(entity);
	if (contentType != null && contentType.getCharset() != null
		&& StringUtils.isNotEmpty(contentType.getCharset().name())) {
	    code = contentType.getCharset().name();
	}
	return code;
    }