Class SegmentInfoFormat

    • Constructor Detail

      • SegmentInfoFormat

        protected SegmentInfoFormat()
        Sole constructor. (For invocation by subclass constructors, typically implicit.)
    • Method Detail

      • read

        public abstract SegmentInfo read​(Directory directory,
                                         java.lang.String segmentName,
                                         byte[] segmentID,
                                         IOContext context)
                                  throws java.io.IOException
        Read SegmentInfo data from a directory.
        Parameters:
        directory - directory to read from
        segmentName - name of the segment to read
        segmentID - expected identifier for the segment
        Returns:
        infos instance to be populated with data
        Throws:
        java.io.IOException - If an I/O error occurs
      • write

        public abstract void write​(Directory dir,
                                   SegmentInfo info,
                                   IOContext ioContext)
                            throws java.io.IOException
        Write SegmentInfo data. The codec must add its SegmentInfo filename(s) to info before doing i/o.
        Throws:
        java.io.IOException - If an I/O error occurs