[英]Search epub contents with epublib
I am using epublib jar file to read epub ebooks in my android application. 我正在使用epublib jar文件在我的android应用程序中阅读epub电子书。 I want the user be able to search ebook contents.
我希望用户能够搜索电子书的内容。 I have figured out there is a package for searching: nl.siegmann.epublib.search.
我已经找到了一个用于搜索的包:nl.siegmann.epublib.search。 I found it from here .
我是从这里找到的。 How can i use the search function in epublib?
如何在epublib中使用搜索功能? Thanks a lot in advance for helping.
在此先感谢您的帮助。
Have a look at SearchIndex.java
: 看看
SearchIndex.java
:
Book your_book = ...;
String your_search_word = "abc";
SearchIndex si = new SearchIndex(your_book);
SearchResults sr = si.doSearch(your_search_word);
// parse sr as needed
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.