Package org.apache.maven.index.updater
Class IndexDataReader
- java.lang.Object
-
- org.apache.maven.index.updater.IndexDataReader
-
public class IndexDataReader extends java.lang.ObjectAn index data reader used to parse transfer index format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexDataReader.IndexDataReadResultAn index data read result holderstatic interfaceIndexDataReader.IndexDataReadVisitorVisitor of indexed Lucene documents.
-
Field Summary
Fields Modifier and Type Field Description private java.io.DataInputStreamdis
-
Constructor Summary
Constructors Constructor Description IndexDataReader(java.io.InputStream is)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.document.DocumentreadDocument()private org.apache.lucene.document.FieldreadField()longreadHeader()IndexDataReader.IndexDataReadResultreadIndex(org.apache.lucene.index.IndexWriter w, IndexingContext context)IndexDataReader.IndexDataReadResultreadIndex(IndexDataReader.IndexDataReadVisitor visitor, IndexingContext context)Reads index content by using a visitor.private static java.lang.StringreadUTF(java.io.DataInput in)
-
-
-
Method Detail
-
readIndex
public IndexDataReader.IndexDataReadResult readIndex(org.apache.lucene.index.IndexWriter w, IndexingContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
readHeader
public long readHeader() throws java.io.IOException- Throws:
java.io.IOException
-
readDocument
public org.apache.lucene.document.Document readDocument() throws java.io.IOException- Throws:
java.io.IOException
-
readField
private org.apache.lucene.document.Field readField() throws java.io.IOException- Throws:
java.io.IOException
-
readUTF
private static java.lang.String readUTF(java.io.DataInput in) throws java.io.IOException- Throws:
java.io.IOException
-
readIndex
public IndexDataReader.IndexDataReadResult readIndex(IndexDataReader.IndexDataReadVisitor visitor, IndexingContext context) throws java.io.IOException
Reads index content by using a visitor.
The visitor is called for each read documents after it has been populated with Lucene fields.- Parameters:
visitor- an index data visitorcontext- indexing context- Returns:
- statistics about read data
- Throws:
java.io.IOException- in case of an IO exception during index file access
-
-