@Test public void testExtractCharsetWithSingleQuotes() { Charset charset = HttpUtils.extractContentTypeCharsetAttribute("text/html; charset='iso-8859-1'"); assertEquals(charset, ISO_8859_1); }
public static Charset extractContentTypeCharsetAttribute(String contentType) { String charsetName = extractContentTypeAttribute(contentType, CONTENT_TYPE_CHARSET_ATTRIBUTE); return charsetName != null ? Charset.forName(charsetName) : null; }
HttpUtils { public static Charset extractContentTypeCharsetAttribute(String contentType) { String charsetName = extractContentTypeAttribute(contentType, CONTENT_TYPE_CHARSET_ATTRIBUTE); return charsetName != null ? Charset.forName(charsetName) : null; } }
HttpUtils { public static Charset extractContentTypeCharsetAttribute(String contentType) { String charsetName = extractContentTypeAttribute(contentType, CONTENT_TYPE_CHARSET_ATTRIBUTE); return charsetName != null ? Charset.forName(charsetName) : null; } private  HttpUtils(); }
HttpUtils { public static Charset extractContentTypeCharsetAttribute(String contentType) { String charsetName = extractContentTypeAttribute(contentType, CONTENT_TYPE_CHARSET_ATTRIBUTE); return charsetName != null ? Charset.forName(charsetName) : null; } private  HttpUtils(); static String hostHeader(Uri uri); static String originHeader(Uri uri); static Charset extractContentTypeCharsetAttribute(String contentType); static String extractContentTypeBoundaryAttribute(String contentType); static byte[] computeMultipartBoundary(); static String patchContentTypeWithBoundaryAttribute(CharSequence base, byte[] boundary); static boolean followRedirect(AsyncHttpClientConfig config, Request request); static ByteBuffer urlEncodeFormParams(List<Param> params, Charset charset); static CharSequence filterOutBrotliFromAcceptEncoding(String acceptEncoding); }
HttpUtils { public static Charset extractContentTypeCharsetAttribute(String contentType) { String charsetName = extractContentTypeAttribute(contentType, CONTENT_TYPE_CHARSET_ATTRIBUTE); return charsetName != null ? Charset.forName(charsetName) : null; } private  HttpUtils(); static String hostHeader(Uri uri); static String originHeader(Uri uri); static Charset extractContentTypeCharsetAttribute(String contentType); static String extractContentTypeBoundaryAttribute(String contentType); static byte[] computeMultipartBoundary(); static String patchContentTypeWithBoundaryAttribute(CharSequence base, byte[] boundary); static boolean followRedirect(AsyncHttpClientConfig config, Request request); static ByteBuffer urlEncodeFormParams(List<Param> params, Charset charset); static CharSequence filterOutBrotliFromAcceptEncoding(String acceptEncoding); static final AsciiString ACCEPT_ALL_HEADER_VALUE; static final AsciiString GZIP_DEFLATE; }