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

org.apache.orc.impl

## Class InStream

- java.lang.Object
- - java.io.InputStream
  - - org.apache.orc.impl.InStream

- All Implemented Interfaces:
    Closeable, AutoCloseable
  Direct Known Subclasses:
    InStream.UncompressedStream

      public abstract class InStream
      extends InputStream

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `InStream.EncryptedStream` Implements a stream over an encrypted, but uncompressed stream.
    `static class` | `InStream.StreamOptions`
    `static class` | `InStream.UncompressedStream` Implements a stream over an uncompressed stream.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DiskRangeList` | `bytes`
    `protected long` | `length`
    `protected Object` | `name`
    `protected long` | `offset`
    `protected long` | `position`
    `static int` | `PROTOBUF_MESSAGE_MAX_LIMIT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InStream(Object name, long offset, long length)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `changeIv(Consumer<byte[]> modifier)`
    `abstract void` | `close()`
    `static InStream` | `create(Object name, DiskRangeList input, long offset, long length)` Create an input stream from a list of disk ranges with data.
    `static InStream` | `create(Object name, DiskRangeList input, long offset, long length, InStream.StreamOptions options)` Create an input stream from a list of disk ranges with data.
    `static com.google.protobuf.CodedInputStream` | `createCodedInputStream(InStream inStream)` Creates coded input stream (used for protobuf message parsing) with higher message size limit.
    `static InStream.StreamOptions` | `options()`
    `protected void` | `reset(DiskRangeList input)` Reset the input to a new set of data.
    `abstract void` | `seek(PositionProvider index)`
    `protected abstract void` | `setCurrent(DiskRangeList newRange, boolean isJump)` Set the current range
    `String` | `toString()`

    - ### Methods inherited from class java.io.InputStream

      `available, mark, markSupported, read, read, read, reset, skip`

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

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

- - ### Field Detail

    - #### PROTOBUF_MESSAGE_MAX_LIMIT

          public static final int PROTOBUF_MESSAGE_MAX_LIMIT

      See Also:
        Constant Field Values

    - #### name

          protected final Object name

    - #### offset

          protected final long offset

    - #### length

          protected final long length

    - #### bytes

          protected DiskRangeList bytes

    - #### position

          protected long position

  - ### Constructor Detail

    - #### InStream

          public InStream(Object name,
                          long offset,
                          long length)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### close

          public abstract void close()

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `InputStream`

    - #### setCurrent

          protected abstract void setCurrent(DiskRangeList newRange,
                                             boolean isJump)

      Set the current range
      Parameters:
        `newRange` - the block that is current
        `isJump` - if this was a seek instead of a natural read

    - #### reset

          protected void reset(DiskRangeList input)

      Reset the input to a new set of data.
      Parameters:
        `input` - the input data

    - #### changeIv

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

    - #### seek

          public abstract void seek(PositionProvider index)
                             throws IOException

      Throws:
        `IOException`

    - #### options

          public static InStream.StreamOptions options()

    - #### create

          public static InStream create(Object name,
                                        DiskRangeList input,
                                        long offset,
                                        long length,
                                        InStream.StreamOptions options)

      Create an input stream from a list of disk ranges with data.
      Parameters:
        `name` - the name of the stream
        `input` - the list of ranges of bytes for the stream; from disk or cache
        `offset` - the first byte offset of the stream
        `length` - the length in bytes of the stream
        `options` - the options to read with
      Returns:
        an input stream

    - #### create

          public static InStream create(Object name,
                                        DiskRangeList input,
                                        long offset,
                                        long length)

      Create an input stream from a list of disk ranges with data.
      Parameters:
        `name` - the name of the stream
        `input` - the list of ranges of bytes for the stream; from disk or cache
        `length` - the length in bytes of the stream
      Returns:
        an input stream

    - #### createCodedInputStream

          public static com.google.protobuf.CodedInputStream createCodedInputStream(InStream inStream)

      Creates coded input stream (used for protobuf message parsing) with higher message size limit.
      Parameters:
        `inStream` - the stream to wrap.
      Returns:
        coded input stream

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