public class SimpleIndexer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SimpleIndexer.FileAnalyzer
A functional interface providing an entry point for performing additional
analysis of indexed files.
|
| Constructor and Description |
|---|
SimpleIndexer() |
| Modifier and Type | Method and Description |
|---|---|
SimpleIndexer |
analyzer(SimpleIndexer.FileAnalyzer analyzer) |
SimpleIndexer |
base(URI base) |
SimpleIndexer |
compress(boolean compress) |
SimpleIndexer |
files(Collection<File> files)
Adds files to be indexed.
|
List<org.osgi.resource.Resource> |
getResources()
Return the resources so far.
|
SimpleIndexer |
increment(long increment) |
void |
index(File file)
Generate the index to the specified file.
|
void |
index(OutputStream outputStream)
Generate the index to the specified output stream.
|
SimpleIndexer |
name(String name) |
SimpleIndexer |
reporter(Reporter reporter) |
public SimpleIndexer files(Collection<File> files)
files - the files to include in the indexpublic SimpleIndexer base(URI base)
base - the base URI from which the index urls are relativepublic SimpleIndexer compress(boolean compress)
compress - compress with GZIP when truepublic SimpleIndexer name(String name)
name - an optional name for the indexpublic SimpleIndexer analyzer(SimpleIndexer.FileAnalyzer analyzer)
analyzer - a resource analyzerpublic SimpleIndexer increment(long increment)
increment - the timestamp of the indexpublic void index(OutputStream outputStream) throws IOException
outputStream - the output stream to write the index fileIOException - if a file cannot be indexedpublic void index(File file) throws IOException
file - the file to write the index fileIOException - if a file cannot be indexedpublic List<org.osgi.resource.Resource> getResources()
public SimpleIndexer reporter(Reporter reporter)
Copyright © 2021. All rights reserved.