Code example for WebResourceResponse

0
		 
		if (r != null) {
			WebResourceResponse response = null;
			 
			try { 
				response = new WebResourceResponse(r.getMediaType().toString(),
						r.getInputEncoding(), r.getInputStream());
			} catch (IOException e) {
				Log.i("epublib", "Problem loading resource: " + url);
			} 
			 
			return response;
		} 
		 
		return super.shouldInterceptRequest(view, url);
	} 
	 
	@Override 
	public void onPageFinished(WebView view, String url) {
		super.onPageFinished(view, url);