com.amazonaws.services.glacier

## クラス TreeHashGenerator

- java.lang.Object
- - com.amazonaws.services.glacier.TreeHashGenerator

-     public class TreeHashGenerator
      extends java.lang.Object

  Utility class for calculating tree hashes.

  For more information on tree hashing, see http://en.wikipedia.org/wiki/Hash_tree.

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

    コンストラクタ
    コンストラクタと説明
    `TreeHashGenerator()`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `static java.lang.String` | `calculateTreeHash(java.io.File file)` Calculates a hex encoded binary hash using a tree hashing algorithm for the data in the specified file.
    `static java.lang.String` | `calculateTreeHash(java.io.InputStream input)` Calculates a hex encoded binary hash using a tree hashing algorithm for the data in the specified input stream.
    `static java.lang.String` | `calculateTreeHash(java.util.List<byte[]> checksums)` Returns the hex encoded binary tree hash for the individual checksums given.

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

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

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

    - #### TreeHashGenerator

          public TreeHashGenerator()

  - ### メソッドの詳細

    - #### calculateTreeHash

          public static java.lang.String calculateTreeHash(java.io.File file)
                                                    throws AmazonClientException

      Calculates a hex encoded binary hash using a tree hashing algorithm for the data in the specified file.
      パラメータ:
        `file` - The file containing the data to hash.
      戻り値:
        The hex encoded binary tree hash for the data in the specified file.
      例外:
        `AmazonClientException` - If any problems were encountered reading the data or computing the hash.

    - #### calculateTreeHash

          public static java.lang.String calculateTreeHash(java.io.InputStream input)
                                                    throws AmazonClientException

      Calculates a hex encoded binary hash using a tree hashing algorithm for the data in the specified input stream. The method will consume all the inputStream and close it when returned.
      パラメータ:
        `input` - The input stream containing the data to hash.
      戻り値:
        The hex encoded binary tree hash for the data in the specified input stream.
      例外:
        `AmazonClientException` - If problems were encountered reading the data or calculating the hash.

    - #### calculateTreeHash

          public static java.lang.String calculateTreeHash(java.util.List<byte[]> checksums)
                                                    throws AmazonClientException

      Returns the hex encoded binary tree hash for the individual checksums given. The sums are assumed to have been generated from sequential 1MB portions of a larger file, with the possible exception of the last part, which may be less than a full MB.
      戻り値:
        The combined hex encoded binary tree hash for the individual checksums specified.
      例外:
        `AmazonClientException` - If problems were encountered reading the data or calculating the hash.