com.amazonaws.util

## クラス ContentLengthValidationInputStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - com.amazonaws.util.ContentLengthValidationInputStream

- すべての実装されたインタフェース:
    java.io.Closeable, java.lang.AutoCloseable

      public class ContentLengthValidationInputStream
      extends java.io.FilterInputStream

  This class validates the Amazon S3 response for the content length as the data is read from the input stream.

- - ### フィールドの概要

    - ### クラスから継承されたフィールド java.io.FilterInputStream

      `in`

  - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `ContentLengthValidationInputStream(java.io.InputStream in, long expectedLength)`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `void` | `mark(int readlimit)` Marks the current position in this input stream.
    `int` | `read()` Reads the next byte of data from the input stream.
    `int` | `read(byte[] arg0, int off, int len)` Reads up to len bytes of data from the input stream into an array of bytes.
    `void` | `reset()` Repositions this stream to the position at the time the mark method was last called on this input stream if and only if mark is supported by the input stream.
    `long` | `skip(long n)` Skips over and discards n bytes of data from this input stream.

    - ### クラスから継承されたメソッド java.io.FilterInputStream

      `available, close, markSupported, read`

    - ### クラスから継承されたメソッド java.lang.Object

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

- - ### コンストラクタの詳細

    - #### ContentLengthValidationInputStream

          public ContentLengthValidationInputStream(java.io.InputStream in,
                                            long expectedLength)

  - ### メソッドの詳細

    - #### read

          public int read()
                   throws java.io.IOException

      Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. If the result is not -1, then the number of bytes read is incremented by 1.
      オーバーライド:
        `read` クラス内 `java.io.FilterInputStream`
      例外:
        `java.io.IOException`

    - #### read

          public int read(byte[] arg0,
                 int off,
                 int len)
                   throws java.io.IOException

      Reads up to len bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len bytes, but a smaller number may be read. The number of bytes actually read is returned as an integer. If the result is not -1, the the number of bytes read is incremented by the result of the read operation.
      オーバーライド:
        `read` クラス内 `java.io.FilterInputStream`
      例外:
        `java.io.IOException`

    - #### skip

          public long skip(long n)
                    throws java.io.IOException

      Skips over and discards n bytes of data from this input stream. Returns the number of bytes skipped from this stream. If the result is not -1, then the number of bytes is incremented by the total number of bytes skipped.
      オーバーライド:
        `skip` クラス内 `java.io.FilterInputStream`
      例外:
        `java.io.IOException`

    - #### mark

          public void mark(int readlimit)

      Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes. The readlimit arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated. The number of bytes read from this stream at this instance is noted so that on subsequent calls to reset, the bytesRead can be reset to this value if mark is success.
      オーバーライド:
        `mark` クラス内 `java.io.FilterInputStream`

    - #### reset

          public void reset()
                     throws java.io.IOException

      Repositions this stream to the position at the time the mark method was last called on this input stream if and only if mark is supported by the input stream. Resets the bytesRead parameter to the mark value.
      オーバーライド:
        `reset` クラス内 `java.io.FilterInputStream`
      例外:
        `java.io.IOException`