/** * Return the character set, as indicated by a {@code charset} parameter, if any. * @return the character set, or {@code null} if not available * @since 4.3 */ @Nullable public Charset getCharset() { String charset = getParameter(PARAM_CHARSET); return (charset != null ? Charset.forName(unquote(charset)) : null); }
protected void checkParameters(String attribute, String value) { Assert.hasLength(attribute, "'attribute' must not be empty"); Assert.hasLength(value, "'value' must not be empty"); checkToken(attribute); if (PARAM_CHARSET.equals(attribute)) { value = unquote(value); Charset.forName(value); } else if (!isQuotedString(value)) { checkToken(value); } }
/** * Return the character set, as indicated by a {@code charset} parameter, if any. * @return the character set, or {@code null} if not available * @since 4.3 */ @Nullable public Charset getCharset() { String charset = getParameter(PARAM_CHARSET); return (charset != null ? Charset.forName(unquote(charset)) : null); }
protected void checkParameters(String attribute, String value) { Assert.hasLength(attribute, "'attribute' must not be empty"); Assert.hasLength(value, "'value' must not be empty"); checkToken(attribute); if (PARAM_CHARSET.equals(attribute)) { value = unquote(value); Charset.forName(value); } else if (!isQuotedString(value)) { checkToken(value); } }
/** * Return the character set, as indicated by a {@code charset} parameter, if any. * @return the character set, or {@code null} if not available * @since 4.3 */ @Nullable public Charset getCharset() { String charset = getParameter(PARAM_CHARSET); return (charset != null ? Charset.forName(unquote(charset)) : null); }
/** * Return the character set, as indicated by a {@code charset} parameter, if any. * @return the character set, or {@code null} if not available * @since 4.3 */ @Nullable public Charset getCharset() { String charset = getParameter(PARAM_CHARSET); return (charset != null ? Charset.forName(unquote(charset)) : null); }
protected void checkParameters(String attribute, String value) { Assert.hasLength(attribute, "'attribute' must not be empty"); Assert.hasLength(value, "'value' must not be empty"); checkToken(attribute); if (PARAM_CHARSET.equals(attribute)) { value = unquote(value); Charset.forName(value); } else if (!isQuotedString(value)) { checkToken(value); } }
protected void checkParameters(String attribute, String value) { Assert.hasLength(attribute, "'attribute' must not be empty"); Assert.hasLength(value, "'value' must not be empty"); checkToken(attribute); if (PARAM_CHARSET.equals(attribute)) { value = unquote(value); Charset.forName(value); } else if (!isQuotedString(value)) { checkToken(value); } }