org.apache.lucene.util

## Class IntBlockPool.SliceReader

- java.lang.Object
- - org.apache.lucene.util.IntBlockPool.SliceReader

- Enclosing class:
    IntBlockPool

      public static final class IntBlockPool.SliceReader
      extends Object

  A `IntBlockPool.SliceReader` that can read int slices written by a `IntBlockPool.SliceWriter`
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SliceReader(IntBlockPool pool)` Creates a new `IntBlockPool.SliceReader` on the given pool

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `endOfSlice()` Returns `true` iff the current slice is fully read.
    `int` | `readInt()` Reads the next int from the current slice and returns it.
    `void` | `reset(int startOffset, int endOffset)` Resets the reader to a slice give the slices absolute start and end offset in the pool

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

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

- - ### Constructor Detail

    - #### SliceReader

          public SliceReader(IntBlockPool pool)

      Creates a new `IntBlockPool.SliceReader` on the given pool

  - ### Method Detail

    - #### reset

          public void reset(int startOffset,
                            int endOffset)

      Resets the reader to a slice give the slices absolute start and end offset in the pool

    - #### endOfSlice

          public boolean endOfSlice()

      Returns `true` iff the current slice is fully read. If this method returns `true` `readInt()` should not be called again on this slice.

    - #### readInt

          public int readInt()

      Reads the next int from the current slice and returns it.
      See Also:
        `endOfSlice()`

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