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

org.apache.orc.impl.writer

## Class StreamOptions

- java.lang.Object
- - org.apache.orc.impl.writer.StreamOptions

-     public class StreamOptions
      extends Object

  The compression and encryption options for writing a stream.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamOptions(int bufferSize)` An option object with the given buffer size set.
    `StreamOptions(StreamOptions other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StreamOptions` | `bufferSize(int bufferSize)`
    `EncryptionAlgorithm` | `getAlgorithm()`
    `int` | `getBufferSize()`
    `CompressionCodec` | `getCodec()`
    `CompressionCodec.Options` | `getCodecOptions()`
    `byte[]` | `getIv()`
    `Key` | `getKey()`
    `boolean` | `isEncrypted()`
    `StreamOptions` | `modifyIv(Consumer<byte[]> modifier)` Modify the IV.
    `String` | `toString()`
    `StreamOptions` | `withCodec(CompressionCodec codec, CompressionCodec.Options options)` Compress using the given codec.
    `StreamOptions` | `withEncryption(EncryptionAlgorithm algorithm, Key key)`

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

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

- - ### Constructor Detail

    - #### StreamOptions

          public StreamOptions(StreamOptions other)

    - #### StreamOptions

          public StreamOptions(int bufferSize)

      An option object with the given buffer size set.
      Parameters:
        `bufferSize` - the size of the buffers.

  - ### Method Detail

    - #### bufferSize

          public StreamOptions bufferSize(int bufferSize)

    - #### withCodec

          public StreamOptions withCodec(CompressionCodec codec,
                                         CompressionCodec.Options options)

      Compress using the given codec.
      Parameters:
        `codec` - the codec to compress with
      Returns:
        this

    - #### withEncryption

          public StreamOptions withEncryption(EncryptionAlgorithm algorithm,
                                              Key key)

    - #### modifyIv

          public StreamOptions modifyIv(Consumer<byte[]> modifier)

      Modify the IV.
      Parameters:
        `modifier` - the function to modify the IV
      Returns:
        returns this

    - #### getCodec

          public CompressionCodec getCodec()

    - #### getCodecOptions

          public CompressionCodec.Options getCodecOptions()

    - #### getIv

          public byte[] getIv()

    - #### getBufferSize

          public int getBufferSize()

    - #### isEncrypted

          public boolean isEncrypted()

    - #### getKey

          public Key getKey()

    - #### getAlgorithm

          public EncryptionAlgorithm getAlgorithm()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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