public static boolean isWeb(Object requestPairSource) {
        return requestPairSource instanceof RequestPairSource && isWeb((RequestPairSource) requestPairSource);
    }
Determine the encoding for the given request.
Can be overridden in subclasses.
<p>The default implementation checks the request's
{@link ServletRequest#getCharacterEncoding() character encoding}, and if that
<code>null</code>, falls back to the {@link #DEFAULT_CHARACTER_ENCODING}.

@param request current HTTP request
@return the encoding for the request (never <code>null</code>)
@see javax.servlet.ServletRequest#getCharacterEncoding()
web/src/main/java/org/apache/shiro/web/util/WebUtils.java