Class DefaultBlobWriteSessionConfig (2.29.0)

public final class DefaultBlobWriteSessionConfig extends BlobWriteSessionConfig

Default 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);
 

Inheritance

java.lang.Object > BlobWriteSessionConfig > DefaultBlobWriteSessionConfig

Methods

getChunkSize()

public int getChunkSize()

The number of bytes each chunk can be.

Default: 16777216 (16 MiB) See Also: #withChunkSize(int)

Returns
TypeDescription
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
NameDescription
chunkSizeint

The number of bytes each chunk should be. Must be >= 262144 (256 KiB)

Returns
TypeDescription
DefaultBlobWriteSessionConfig

The new instance