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 Summary
Constructors Constructor and Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GcsFileOptions.Builder
acl(String acl)
Sets the acl of the object.GcsFileOptions.Builder
addUserMetadata(String key, String value)
Adds user specific metadata that will be added to object headers when served through Google Storage.GcsFileOptions
build()
Create an instance of GcsFileOptions with the parameters set in this builderGcsFileOptions.Builder
cacheControl(String cacheControl)
Sets the cache control for the object.GcsFileOptions.Builder
contentDisposition(String contentDisposition)
Sets the content disposition for the object.GcsFileOptions.Builder
contentEncoding(String contentEncoding)
Sets the content encoding for the object.GcsFileOptions.Builder
mimeType(String mimeType)
Sets the mime type of the object.
-
-
-
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
-
cacheControl
public GcsFileOptions.Builder cacheControl(String cacheControl)
Sets the cache control for the object. If not set, default value is used.- Parameters:
cacheControl
- to use for the Google Storage object.- Returns:
- this builder for chaining.
- See Also:
- GCS and the Cache-Control Header
-
contentEncoding
public GcsFileOptions.Builder contentEncoding(String contentEncoding)
Sets the content encoding for the object. If not set, default value is used.- Parameters:
contentEncoding
- to use for the Google Storage object.- Returns:
- this builder for chaining.
- See Also:
- GCS and the Content-Encoding Header
-
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 addfoo->bar
entry to userMetadata map, it will be served out as a header:x-goog-meta-foo: bar
.- Parameters:
key
- metadata/header name suffixvalue
- 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.