RunLengthIntegerWriter (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc.impl

## Class RunLengthIntegerWriter

- java.lang.Object
- - org.apache.orc.impl.RunLengthIntegerWriter

- All Implemented Interfaces:
    IntegerWriter

      public class RunLengthIntegerWriter
      extends Object
      implements IntegerWriter

  A streamFactory that writes a sequence of integers. A control byte is written before each run with positive values 0 to 127 meaning 3 to 130 repetitions, each repetition is offset by a delta. If the control byte is -1 to -128, 1 to 128 literal vint values follow.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RunLengthIntegerWriter(PositionedOutputStream output, boolean signed)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `changeIv(Consumer<byte[]> modifier)`
    `long` | `estimateMemory()` Estimate the amount of memory being used.
    `void` | `flush()` Flush the buffer
    `void` | `getPosition(PositionRecorder recorder)` Get position from the stream.
    `void` | `write(long value)` Write the integer value

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

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

- - ### Constructor Detail

    - #### RunLengthIntegerWriter

          public RunLengthIntegerWriter(PositionedOutputStream output,
                                        boolean signed)

  - ### Method Detail

    - #### flush

          public void flush()
                     throws IOException

      Description copied from interface: `IntegerWriter`
      Flush the buffer
      Specified by:
        `flush` in interface `IntegerWriter`
      Throws:
        `IOException`

    - #### write

          public void write(long value)
                     throws IOException

      Description copied from interface: `IntegerWriter`
      Write the integer value
      Specified by:
        `write` in interface `IntegerWriter`
      Throws:
        `IOException`

    - #### getPosition

          public void getPosition(PositionRecorder recorder)
                           throws IOException

      Description copied from interface: `IntegerWriter`
      Get position from the stream.
      Specified by:
        `getPosition` in interface `IntegerWriter`
      Throws:
        `IOException`

    - #### estimateMemory

          public long estimateMemory()

      Description copied from interface: `IntegerWriter`
      Estimate the amount of memory being used.
      Specified by:
        `estimateMemory` in interface `IntegerWriter`
      Returns:
        number of bytes

    - #### changeIv

          public void changeIv(Consumer<byte[]> modifier)

      Specified by:
        `changeIv` in interface `IntegerWriter`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.