客户端的html文件加密 [英] html files encryption for client side
问题描述
在搜索要在那里显示 html 文件的关键字后,我使用 lucene 在客户端进行索引和搜索.那么有什么方法可以存储和访问 html 文件.实际上 html 文件正在存储图像和链接,它们应该在 java api 中作为普通 html 文件打开.我正在使用以下代码进行 lucene 索引
I am using lucene for indexing and searching on client side after searching the keyword i want to display the html files there . So is there any way to store and access the html files . actually the html files are storing images and links and they should be opened in the java api as normal html file . I am using the following code for lucene indexing
try
{
IndexWriter indexWriter = new IndexWriter(
FSDirectory.open(indexDir),
new SimpleAnalyzer(),
true,
IndexWriter.MaxFieldLength.LIMITED);
indexWriter.setUseCompoundFile(false);
indexDirectory(indexWriter, dataDir, suffix);
Document doc = new Document();
doc.add(new Field("contents", new FileReader(f)));
doc.add(new Field("filename",f.getCanonicalPath(),
Field.Store.YES,Field.Index.ANALYZED));
indexWriter.addDocument(doc);
numIndexed = indexWriter.maxDoc();
indexWriter.optimize();
indexWriter.close();
}
catch(Exception ex)
{
}
我应该如何在客户端显示符合搜索条件的 html 文件
How should i display the html files matching the search criteria on client side
推荐答案
您可能正在寻找 browse()
,它启动默认浏览器以显示 URI."或者,可以使用 编辑器窗格,尽管支持有限.
You may be looking for browse()
, which "Launches the default browser to display a URI." Alternatively, an editor pane can be used, although support is limited.
这篇关于客户端的html文件加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!