Send feedback
Class CloudStorageOptions (0.125.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.125.0 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
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
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
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
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
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-16 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-16 UTC."],[],[]]