I asked a similar question before about the loading archive file to WebView.
According to the tutorial, I have to load the archive file to InputStream so that I can use the method loadToWebView in WebArchiveReader.java.
However, in the tutorial, the writer get the archive file by using the following statement:
InputStream is = getAssets().open("TestHtmlArchive.xml");
Unfortunately, I want to get the archive file from somewhere else other than "Assets" folder.
WebView webView = (WebView) rootView.findViewById(R.id.webview_layout);
String url = "http://www.yahoo.com";
webView.loadUrl(url);
String path = getFilesDir().getAbsolutePath() + File.separator + "yahoo" + ".html";
webView.saveWebArchive(path);
webView.loadUrl("file://" + path);
Assuming I want to load the file "yahoo.html" as I saved in the code above.
How can I get it to an instance of InputStream?