HadoopShims.ZeroCopyReaderShim (ORC Shims 1.6.6 API)
Date: 2021-01-13

org.apache.orc.impl

## Interface HadoopShims.ZeroCopyReaderShim

- All Superinterfaces:
    AutoCloseable, Closeable
  Enclosing interface:
    HadoopShims

      public static interface HadoopShims.ZeroCopyReaderShim
      extends Closeable

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the underlying stream.
    `ByteBuffer` | `readBuffer(int maxLength, boolean verifyChecksums)` Get a ByteBuffer from the FSDataInputStream - this can be either a HeapByteBuffer or an MappedByteBuffer.
    `void` | `releaseBuffer(ByteBuffer buffer)` Release a ByteBuffer obtained from a readBuffer on this ZeroCopyReaderShim.

- - ### Method Detail

    - #### readBuffer

          ByteBuffer readBuffer(int maxLength,
                                boolean verifyChecksums)
                         throws IOException

      Get a ByteBuffer from the FSDataInputStream - this can be either a HeapByteBuffer or an MappedByteBuffer. Also move the in stream by that amount. The data read can be small than maxLength.
      Returns:
        ByteBuffer read from the stream,
      Throws:
        `IOException`

    - #### releaseBuffer

          void releaseBuffer(ByteBuffer buffer)

      Release a ByteBuffer obtained from a readBuffer on this ZeroCopyReaderShim.

    - #### close

          void close()
              throws IOException

      Close the underlying stream.
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `Closeable`
      Throws:
        `IOException`

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