Class CloudStorageOptions (0.124.21)
0.143.0 (latest)
0.139.0
0.135.0
0.134.0
0.133.0
0.131.0
0.128.13
0.127.38
0.126.19
0.125.0
0.124.21
0.123.28
public final class CloudStorageOptions
Helper class for specifying options when opening and copying Cloud Storage files.
Static Methods
withAcl(Acl acl)
public static CloudStorageOption . OpenCopy withAcl ( Acl acl )
Parameter
Name
Description
acl
com.google.cloud.storage.Acl
Returns
withBlockSize(int size)
public static CloudStorageOption . OpenCopy withBlockSize ( int size )
Sets the block size (in bytes) when talking to the Google Cloud Storage server.
The default is {@value CloudStorageFileSystem#BLOCK_SIZE_DEFAULT}.
Parameter
Name
Description
size
int
Returns
withCacheControl(String cacheControl)
public static CloudStorageOption . OpenCopy withCacheControl ( String cacheControl )
Parameter
Name
Description
cacheControl
String
Returns
withChannelReopen(int count)
public static CloudStorageOption . OpenCopy withChannelReopen ( int count )
Sets the max number of times that the channel can be reopened if reading fails because the
channel unexpectedly closes.
The default is 0.
Parameter
Name
Description
count
int
Returns
withContentDisposition(String contentDisposition)
public static CloudStorageOption . OpenCopy withContentDisposition ( String contentDisposition )
Parameter
Name
Description
contentDisposition
String
Returns
withContentEncoding(String contentEncoding)
public static CloudStorageOption . OpenCopy withContentEncoding ( String contentEncoding )
Parameter
Name
Description
contentEncoding
String
Returns
withMimeType(String mimeType)
public static CloudStorageOption . OpenCopy withMimeType ( String mimeType )
Sets the mime type header on an object, e.g. "text/plain".
Parameter
Name
Description
mimeType
String
Returns
public static CloudStorageOption . OpenCopy withUserMetadata ( String key , String value )
Parameters
Returns
withoutCaching()
public static CloudStorageOption . OpenCopy withoutCaching ()
Disables caching on an object. Same as: withCacheControl("no-cache").
Returns
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-19 UTC."],[],[]]