org.apache.lucene.codecs

## Class FieldInfosFormat

- java.lang.Object
- - org.apache.lucene.codecs.FieldInfosFormat

- Direct Known Subclasses:
    Lucene50FieldInfosFormat, Lucene60FieldInfosFormat

      public abstract class FieldInfosFormat
      extends Object

  Encodes/decodes `FieldInfos`
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FieldInfosFormat()` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract FieldInfos` | `read(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext iocontext)` Read the `FieldInfos` previously written with `write(org.apache.lucene.store.Directory, org.apache.lucene.index.SegmentInfo, java.lang.String, org.apache.lucene.index.FieldInfos, org.apache.lucene.store.IOContext)`.
    `abstract void` | `write(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context)` Writes the provided `FieldInfos` to the directory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FieldInfosFormat

          protected FieldInfosFormat()

      Sole constructor. (For invocation by subclass constructors, typically implicit.)

  - ### Method Detail

    - #### read

          public abstract FieldInfos read(Directory directory,
                                          SegmentInfo segmentInfo,
                                          String segmentSuffix,
                                          IOContext iocontext)
                                   throws IOException

      Read the `FieldInfos` previously written with `write(org.apache.lucene.store.Directory, org.apache.lucene.index.SegmentInfo, java.lang.String, org.apache.lucene.index.FieldInfos, org.apache.lucene.store.IOContext)`.
      Throws:
        `IOException`

    - #### write

          public abstract void write(Directory directory,
                                     SegmentInfo segmentInfo,
                                     String segmentSuffix,
                                     FieldInfos infos,
                                     IOContext context)
                              throws IOException

      Writes the provided `FieldInfos` to the directory.
      Throws:
        `IOException`

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.