GcsFileOptions.Builder (App Engine Client for Google Cloud Storage 0.6 API)

com.google.appengine.tools.cloudstorage

Class GcsFileOptions.Builder

  • java.lang.Object
    • com.google.appengine.tools.cloudstorage.GcsFileOptions.Builder
  • Enclosing class:
    GcsFileOptions


    public static final class GcsFileOptions.Builder
    extends Object
    A builder of GcsFileOptions.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • mimeType

        public GcsFileOptions.Builder mimeType(String mimeType)
        Sets the mime type of the object. If not set, default Google Storage mime type is used when served out of Google Storage.
        Parameters:
        mimeType - of the Google Storage object.
        Returns:
        this builder for chaining.
        See Also:
        GCS and the Content-Type Header
      • acl

        public GcsFileOptions.Builder acl(String acl)
        Sets the acl of the object. If not set, defaults to none (i.e., bucket default).
        Parameters:
        acl - to use for the Google Storage object.
        Returns:
        this builder for chaining.
        See Also:
        GCS Access Controls
      • contentDisposition

        public GcsFileOptions.Builder contentDisposition(String contentDisposition)
        Sets the content disposition for the object. If not set, default value is used.
        Parameters:
        contentDisposition - to use for the Google Storage object.
        Returns:
        this builder for chaining.
        See Also:
        GCS and the Content-Disposition Header
      • addUserMetadata

        public GcsFileOptions.Builder addUserMetadata(String key,
                                                      String value)
        Adds user specific metadata that will be added to object headers when served through Google Storage.

        Each entry will be prefixed with x-goog-meta- when serving out. For example, if you add foo->bar entry to userMetadata map, it will be served out as a header: x-goog-meta-foo: bar.

        Parameters:
        key - metadata/header name suffix
        value - metadata/header value
        Returns:
        this builder for chaining.
        See Also:
        GCS and Custom User Metadata Headers
      • build

        public GcsFileOptions build()
        Create an instance of GcsFileOptions with the parameters set in this builder
        Returns:
        a new instance of GcsFileOptions

Copyright © 2016 Google. All rights reserved.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

App Engine standard environment for Java