@Override public String getCharset(){ MimeType contentType = getContentType(); return null == contentType ? null : contentType.getCharset(); }
/** * Returns the content's charset or null if not specified. */ default String getCharset() { MimeType contentType = getContentType(); return null == contentType ? null : contentType.getCharset(); }
protected String charset() { MimeType mt = getContentType(); if(null != mt && !Strings.isEmpty(mt.getCharset())) { return mt.getCharset(); }else{ return client.getDefaultCharset().name(); } }
protected Charset charset(){ MimeType contentType = getContentType(); String charset = null == contentType ? null : contentType.getCharset(); return null == charset ? Charsets.UTF_8 : Charsets.forName(charset); } }