com.amazonaws.services.s3.model

## クラス S3Object

- java.lang.Object
- - com.amazonaws.services.s3.model.S3Object

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

      public class S3Object
      extends java.lang.Object
      implements java.io.Closeable

  Represents an object stored in Amazon S3. This object contains the data content and the object metadata stored by Amazon S3, such as content type, content length, etc.
  関連項目:
    `ObjectMetadata`

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

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

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `void` | `close()` Releases any underlying system resources.
    `java.lang.String` | `getBucketName()` Gets the name of the bucket in which this object is contained.
    `java.lang.String` | `getKey()` Gets the key under which this object is stored.
    `S3ObjectInputStream` | `getObjectContent()` Gets an input stream containing the contents of this object.
    `ObjectMetadata` | `getObjectMetadata()` Gets the metadata stored by Amazon S3 for this object.
    `java.lang.String` | `getRedirectLocation()` Gets the redirect location for this object.
    `void` | `setBucketName(java.lang.String bucketName)` Sets the name of the bucket in which this object is contained.
    `void` | `setKey(java.lang.String key)` Sets the key under which this object is stored.
    `void` | `setObjectContent(java.io.InputStream objectContent)` Sets the input stream containing this object's contents.
    `void` | `setObjectContent(S3ObjectInputStream objectContent)` Sets the input stream containing this object's contents.
    `void` | `setObjectMetadata(ObjectMetadata metadata)` Sets the object metadata for this object.
    `void` | `setRedirectLocation(java.lang.String redirectLocation)` Sets the redirect location for this object.
    `java.lang.String` | `toString()`

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

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

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

    - #### S3Object

          public S3Object()

  - ### メソッドの詳細

    - #### getObjectMetadata

          public ObjectMetadata getObjectMetadata()

      Gets the metadata stored by Amazon S3 for this object. The `ObjectMetadata` object includes any custom user metadata supplied by the caller when the object was uploaded, as well as HTTP metadata such as content length and content type.
      戻り値:
        The metadata stored by Amazon S3 for this object.
      関連項目:
        `getObjectContent()`

    - #### setObjectMetadata

          public void setObjectMetadata(ObjectMetadata metadata)

      Sets the object metadata for this object.

      NOTE: This does not update the object metadata stored in Amazon S3, but only updates this object in local memory. To update an object's metadata in S3, use `AmazonS3.copyObject(CopyObjectRequest)` to copy the object to a new (or the same location) and specify new object metadata then.

      パラメータ:
        `metadata` - The new metadata to set for this object in memory.

    - #### getObjectContent

          public S3ObjectInputStream getObjectContent()

      Gets an input stream containing the contents of this object. Callers should close this input stream as soon as possible, because the object contents aren't buffered in memory and stream directly from Amazon S3.
      戻り値:
        An input stream containing the contents of this object.
      関連項目:
        `getObjectMetadata()`, `setObjectContent(InputStream)`

    - #### setObjectContent

          public void setObjectContent(S3ObjectInputStream objectContent)

      Sets the input stream containing this object's contents.
      パラメータ:
        `objectContent` - The input stream containing this object's contents.
      関連項目:
        `getObjectContent()`

    - #### setObjectContent

          public void setObjectContent(java.io.InputStream objectContent)

      Sets the input stream containing this object's contents.
      パラメータ:
        `objectContent` - The input stream containing this object's contents. Will get wrapped in an S3ObjectInputStream.
      関連項目:
        `getObjectContent()`

    - #### getBucketName

          public java.lang.String getBucketName()

      Gets the name of the bucket in which this object is contained.
      戻り値:
        The name of the bucket in which this object is contained.
      関連項目:
        `setBucketName(String)`

    - #### setBucketName

          public void setBucketName(java.lang.String bucketName)

      Sets the name of the bucket in which this object is contained.
      パラメータ:
        `bucketName` - The name of the bucket containing this object.
      関連項目:
        `getBucketName()`

    - #### getKey

          public java.lang.String getKey()

      Gets the key under which this object is stored.
      戻り値:
        The key under which this object is stored.
      関連項目:
        `setKey(String)`

    - #### setKey

          public void setKey(java.lang.String key)

      Sets the key under which this object is stored.
      パラメータ:
        `key` - The key under which this object is stored.
      関連項目:
        `getKey()`

    - #### getRedirectLocation

          public java.lang.String getRedirectLocation()

      Gets the redirect location for this object.

    - #### setRedirectLocation

          public void setRedirectLocation(java.lang.String redirectLocation)

      Sets the redirect location for this object.
      パラメータ:
        `redirectLocation` - the redirect location for that object.

    - #### toString

          public java.lang.String toString()

      オーバーライド:
        `toString` クラス内 `java.lang.Object`
      関連項目:
        `Object.toString()`

    - #### close

          public void close()
                     throws java.io.IOException

      Releases any underlying system resources. If the resources are already released then invoking this method has no effect.
      定義:
        `close` インタフェース内 `java.io.Closeable`
      定義:
        `close` インタフェース内 `java.lang.AutoCloseable`
      例外:
        `java.io.IOException` - if an I/O error occurs