Send feedback
Class CloudStorageOptions (0.127.28)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
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
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
withCacheControl(String cacheControl)
public static CloudStorageOption . OpenCopy withCacheControl ( String cacheControl )
Parameter
Name
Description
cacheControl
String
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
withContentDisposition(String contentDisposition)
public static CloudStorageOption . OpenCopy withContentDisposition ( String contentDisposition )
Parameter
Name
Description
contentDisposition
String
withContentEncoding(String contentEncoding)
public static CloudStorageOption . OpenCopy withContentEncoding ( String contentEncoding )
Parameter
Name
Description
contentEncoding
String
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
public static CloudStorageOption . OpenCopy withUserMetadata ( String key , String value )
withoutCaching()
public static CloudStorageOption . OpenCopy withoutCaching ()
Disables caching on an object. Same as: withCacheControl("no-cache")
.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-19 UTC."],[],[]]