## org.apache.lucene.codecs.intblock
Class FixedIntBlockIndexOutput

    java.lang.Object
      org.apache.lucene.codecs.sep.IntIndexOutput
          org.apache.lucene.codecs.intblock.FixedIntBlockIndexOutput

All Implemented Interfaces:
  Closeable

    public abstract class FixedIntBlockIndexOutput

extends IntIndexOutput

Abstract base class that writes fixed-size blocks of ints to an IndexOutput. While this is a simple approach, a more performant approach would directly create an impl of IntIndexOutput inside Directory. Wrapping a generic IndexInput will likely cost performance.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
`protected int[]` `buffer`
`protected IndexOutput` `out`

Constructor Summary
`protected` `FixedIntBlockIndexOutput(IndexOutput out, int fixedBlockSize)`

Method Summary
`void` `close()`
`protected abstract void` `flushBlock()`
`IntIndexOutput.Index` `index()` If you are indexing the primary output file, call this and interact with the returned IndexWriter.
`void` `write(int v)` Write an int to the primary file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### out

    protected final IndexOutput out

### buffer

    protected final int[] buffer

Constructor Detail

### FixedIntBlockIndexOutput

    protected FixedIntBlockIndexOutput(IndexOutput out,
                                       int fixedBlockSize)
                                throws IOException

Throws:
  `IOException`

Method Detail

### flushBlock

    protected abstract void flushBlock()
                                throws IOException

  Throws:
    `IOException`

### index

    public IntIndexOutput.Index index()
                               throws IOException

  Description copied from class: `IntIndexOutput`
  If you are indexing the primary output file, call this and interact with the returned IndexWriter.

  Specified by:
    `index` in class `IntIndexOutput`
  Throws:
    `IOException`

### write

    public void write(int v)
               throws IOException

  Description copied from class: `IntIndexOutput`
  Write an int to the primary file. The value must be >= 0.

  Specified by:
    `write` in class `IntIndexOutput`
  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Specified by:
    `close` in class `IntIndexOutput`
  Throws:
    `IOException`

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