com.aliyun.oss.crypto

## 类 AdjustedRangeInputStream

- java.lang.Object
- - java.io.InputStream
  - - com.aliyun.oss.crypto.AdjustedRangeInputStream

- 所有已实现的接口:
    Closeable, AutoCloseable

      public class AdjustedRangeInputStream
      extends InputStream

  Reads only a specific range of bytes from the underlying input stream.

- - ### 构造器概要

    构造器
    构造器和说明
    `AdjustedRangeInputStream(InputStream objectContents, long rangeBeginning, long rangeEnd)` Creates a new DecryptedContentsInputStream object.

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected void` | `abortIfNeeded()` Aborts the inputstream operation if thread is interrupted.
    `int` | `available()`
    `void` | `close()`
    `InputStream` | `getWrappedInputStream()`
    `int` | `read()`
    `int` | `read(byte[] buffer, int offset, int length)`

    - ### 从类继承的方法 java.io.InputStream

      `mark, markSupported, read, reset, skip`

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### AdjustedRangeInputStream

          public AdjustedRangeInputStream(InputStream objectContents,
                                  long rangeBeginning,
                                  long rangeEnd)
                                   throws IOException

      Creates a new DecryptedContentsInputStream object.
      参数:
        `objectContents` - The input stream containing the object contents retrieved from OSS
        `rangeBeginning` - The position of the left-most byte desired by the user
        `rangeEnd` - The position of the right-most byte desired by the user
      抛出:
        `IOException` - If there are errors skipping to the left-most byte desired by the user.

  - ### 方法详细资料

    - #### abortIfNeeded

          protected final void abortIfNeeded()

      Aborts the inputstream operation if thread is interrupted. interrupted status of the thread is cleared by this method.
      抛出:
        `ClientException` - with ClientErrorCode INPUTSTREAM_READING_ABORTED if thread aborted.

    - #### read

          public int read()
                   throws IOException

      指定者:
        `read` 在类中 `InputStream`
      抛出:
        `IOException`

    - #### read

          public int read(byte[] buffer,
                 int offset,
                 int length)
                   throws IOException

      覆盖:
        `read` 在类中 `InputStream`
      抛出:
        `IOException`

    - #### available

          public int available()
                        throws IOException

      覆盖:
        `available` 在类中 `InputStream`
      抛出:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      指定者:
        `close` 在接口中 `Closeable`
      指定者:
        `close` 在接口中 `AutoCloseable`
      覆盖:
        `close` 在类中 `InputStream`
      抛出:
        `IOException`

    - #### getWrappedInputStream

          public InputStream getWrappedInputStream()

Copyright © 2020. All Rights Reserved.