public final class DefaultBlobWriteSessionConfig extends BlobWriteSessionConfig implements BlobWriteSessionConfig.HttpCompatible, BlobWriteSessionConfig.GrpcCompatibleDefault Configuration to represent uploading to Google Cloud Storage in a chunked manner.
Perform a resumable upload, uploading at most chunkSize bytes each PUT.
Configuration of chunk size can be performed via DefaultBlobWriteSessionConfig#withChunkSize(int).
An instance of this class will provide a BlobWriteSession is logically equivalent to the following:
Storage storage = ...;
WriteChannel writeChannel = storage.writer(BlobInfo, BlobWriteOption);
writeChannel.setChunkSize(chunkSize);
Implements
com.google.cloud.storage.BlobWriteSessionConfig.HttpCompatible, com.google.cloud.storage.BlobWriteSessionConfig.GrpcCompatibleMethods
equals(Object o)
public boolean equals(Object o)| Parameter | |
|---|---|
| Name | Description |
o |
Object |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getChunkSize()
public int getChunkSize()| Returns | |
|---|---|
| Type | Description |
int |
|
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
withChunkSize(int chunkSize)
public DefaultBlobWriteSessionConfig withChunkSize(int chunkSize)Create a new instance with the chunkSize set to the specified value.
Default: 16777216 (16 MiB)
See Also: #getChunkSize()
| Parameter | |
|---|---|
| Name | Description |
chunkSize |
intThe number of bytes each chunk should be. Must be >= |
| Returns | |
|---|---|
| Type | Description |
DefaultBlobWriteSessionConfig |
The new instance |