Class CloudStorageOptions
java.lang.Object
com.google.cloud.storage.contrib.nio.CloudStorageOptions
Helper class for specifying options when opening and copying Cloud Storage files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CloudStorageOption.OpenCopywithAcl(com.google.cloud.storage.Acl acl) Sets the ACL value on a Cloud Storage object.static CloudStorageOption.OpenCopywithBlockSize(int size) Sets the block size (in bytes) when talking to the Google Cloud Storage server.static CloudStorageOption.OpenCopywithCacheControl(String cacheControl) Sets theCache-ControlHTTP header on an object.static CloudStorageOption.OpenCopywithChannelReopen(int count) Sets the max number of times that the channel can be reopened if reading fails because the channel unexpectedly closes.static CloudStorageOption.OpenCopywithContentDisposition(String contentDisposition) Sets theContent-DispositionHTTP header on an object.static CloudStorageOption.OpenCopywithContentEncoding(String contentEncoding) Sets theContent-EncodingHTTP header on an object.static CloudStorageOption.OpenCopywithMimeType(String mimeType) Sets the mime type header on an object, e.g.static CloudStorageOption.OpenCopyDisables caching on an object.static CloudStorageOption.OpenCopywithUserMetadata(String key, String value) Sets an unmodifiable piece of user metadata on a Cloud Storage object.
-
Method Details
-
withMimeType
Sets the mime type header on an object, e.g."text/plain". -
withoutCaching
Disables caching on an object. Same as:withCacheControl("no-cache"). -
withCacheControl
Sets theCache-ControlHTTP header on an object.- See Also:
-
- "https://developers.google.com/storage/docs/reference-headers#cachecontrol"
-
withContentDisposition
Sets theContent-DispositionHTTP header on an object.- See Also:
-
- "https://developers.google.com/storage/docs/reference-headers#contentdisposition"
-
withContentEncoding
Sets theContent-EncodingHTTP header on an object.- See Also:
-
- "https://developers.google.com/storage/docs/reference-headers#contentencoding"
-
withAcl
Sets the ACL value on a Cloud Storage object.- See Also:
-
- "https://developers.google.com/storage/docs/reference-headers#acl"
-
withUserMetadata
Sets an unmodifiable piece of user metadata on a Cloud Storage object.- See Also:
-
- "https://developers.google.com/storage/docs/reference-headers#xgoogmeta"
-
withBlockSize
Sets the block size (in bytes) when talking to the Google Cloud Storage server.The default is 2097152.
-
withChannelReopen
Sets the max number of times that the channel can be reopened if reading fails because the channel unexpectedly closes.The default is 0.
-