code: public static boolean isEncoded (final HttpEntity entity) {
          Header h = entity.getContentType();
          if (h != null) {
              HeaderElement[] elems = h.getElements();
              if (elems.length > 0) {
                  String contentType = elems[0].getName();
                  return contentType.equalsIgnoreCase(CONTENT_TYPE);
              } else {
                  return false;
              }
          } else {
              return false;
          }
      }
docs: Returns true if the entity's Content-Type header is
  <code>application/x-www-form-urlencoded</code>.