使用WebView从存档中查看html [英] View html from archive using WebView
本文介绍了使用WebView从存档中查看html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有zip压缩文件,其中包含一组html页面。我需要从中加载html页面。我需要重新定义链接的解决机制。可以使用WebView javafx吗?
I have zip-compressed file, which contains a set of html pages. I need to load html-pages from it. I need to redefine the mechanism of resolve of links. It is possible using WebView javafx?
推荐答案
尝试使用 ZipFile
和 ZipEntry
从.zip文件中检索您的html文档为 InputStream
:
Try using ZipFile
and ZipEntry
to retrieve your html documents from the .zip file as an InputStream
:
ZipFile zipFile = new ZipFile("path to your .zip");
ZipEntry zipEntry = new ZipEntry("name of your html file");
InputStream is = zipFile.getInputStream(zipEntry); //InputStream to your file
这篇关于使用WebView从存档中查看html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文