Class CloudStorageOptions (0.127.13)
Stay organized with collections
Save and categorize content based on your preferences.
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")
.
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-03-22 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]