Class IndexDataReader


  • public class IndexDataReader
    extends java.lang.Object
    An index data reader used to parse transfer index format.
    • Field Detail

      • dis

        private final java.io.DataInputStream dis
    • Constructor Detail

      • IndexDataReader

        public IndexDataReader​(java.io.InputStream is)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • 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 visitor
        context - indexing context
        Returns:
        statistics about read data
        Throws:
        java.io.IOException - in case of an IO exception during index file access