/** * Obtains character set of the entity, if known. * * @param entity must not be null * @return the character set, or null if not found * @throws ParseException if header elements cannot be parsed * @throws IllegalArgumentException if entity is null * * @deprecated (4.1.3) use {@link ContentType#getOrDefault(HttpEntity)} */ @Deprecated public static String getContentCharSet(final HttpEntity entity) throws ParseException { Args.notNull(entity, "Entity"); String charset = null; if (entity.getContentType() != null) { final HeaderElement values[] = entity.getContentType().getElements(); if (values.length > 0) { final NameValuePair param = values[0].getParameterByName("charset"); if (param != null) { charset = param.getValue(); } } } return charset; }
boolean netscape = false; for (final HeaderElement helem: helems) { if (helem.getParameterByName("version") != null) { versioned = true; if (helem.getParameterByName("expires") != null) { netscape = true;
boolean netscape = false; for (final HeaderElement helem: helems) { if (helem.getParameterByName("version") != null) { versioned = true; if (helem.getParameterByName("expires") != null) { netscape = true;