code: public static String getEntityEncoding(HttpEntity entity) {
  		final Header header = entity.getContentEncoding();
  		if (header == null)
  			return null;
  		return header.getValue();
  	}
docs: Returns entity encoding.
  
  @param entity
  entitity to get encoding.
  @return entity encoding string.