Code example for WebResourceResponse

0
            byte [] b = getElBytes(parentEl, "mimeType");
            String mimeType = b == null ? "text/html" : new String(b);
            b = getElBytes(parentEl, "textEncoding");
            String encoding = b == null ? "UTF-8" : new String(b);
            b = getElBytes(parentEl, "data");
            return new WebResourceResponse(mimeType, encoding, new ByteArrayInputStream(b));
        } 
 
        @Override 
        public void onPageFinished(WebView view, String url)
        { 
            // our WebClient is no longer needed in view 
            view.setWebViewClient(null);
            myLoadingArchive = false;
            onFinished(myWebView);
        } 
    } 
}