BlobClient Class
Definition
This class provides a client that contains generic blob operations for Azure Storage Blobs. Operations allowed by the client are uploading and downloading, copying a blob, retrieving and setting metadata, retrieving and setting HTTP headers, and deleting and un-deleting a blob.
This client is instantiated through BlobClientBuilder or retrieved via getBlobClient(String blobName).
For operations on a specific blob type (i.e append, block, or page) use getAppendBlobClient(), getBlockBlobClient(), or getPageBlobClient() to construct a client that allows blob specific operations.
Please refer to the Azure Docs for more information.
public class BlobClient extends BlobClientBase
- Inheritance
Inherited Members
Constructors
| BlobClient(BlobAsyncClient client) |
Protected constructor for use by BlobClientBuilder. |
Fields
| BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE |
If a blob is known to be greater than 100MB, using a larger block size will trigger some server-side optimizations. If the block size is not set and the size of the blob is known to be greater than 100MB, this value will be used. |
| BLOB_DEFAULT_NUMBER_OF_BUFFERS |
The number of buffers to use if none is specied on the buffered upload method. |
| BLOB_DEFAULT_UPLOAD_BLOCK_SIZE |
The block size to use if none is specified in parallel operations. |
Methods
| getAppendBlobClient() |
Creates a new AppendBlobClient associated with this blob. |
| getBlockBlobClient() |
Creates a new BlockBlobClient associated with this blob. |
| getCustomerProvidedKeyClient(CustomerProvidedKey customerProvidedKey) |
Creates a new BlobClient with the specified |
| getEncryptionScopeClient(String encryptionScope) |
Creates a new BlobClient with the specified |
| getPageBlobClient() |
Creates a new PageBlobClient associated with this blob. |
| getSnapshotClient(String snapshot) |
Creates a new BlobClient linked to the |
| getVersionClient(String versionId) |
Creates a new BlobClient linked to the |
| upload(BinaryData data) |
Creates a new blob. By default this method will not overwrite an existing blob. |
| upload(BinaryData data, boolean overwrite) |
Creates a new blob, or updates the content of an existing blob. |
| upload(InputStream data, long length) |
Creates a new blob. By default this method will not overwrite an existing blob. |
| upload(InputStream data, long length, boolean overwrite) |
Creates a new blob, or updates the content of an existing blob. |
| uploadFromFile(String filePath) |
Creates a new block blob. By default this method will not overwrite an existing blob. Code Samples
|
| uploadFromFile(String filePath, boolean overwrite) |
Creates a new block blob, or updates the content of an existing block blob. Code Samples
|
| uploadFromFile(String filePath, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String,String> metadata, AccessTier tier, BlobRequestConditions requestConditions, Duration timeout) |
Creates a new block blob, or updates the content of an existing block blob. To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch). Code Samples
|
| uploadFromFileWithResponse(BlobUploadFromFileOptions options, Duration timeout, Context context) |
Creates a new block blob, or updates the content of an existing block blob. To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch). Code Samples
|
| uploadWithResponse(BlobParallelUploadOptions options, Context context) |
Creates a new blob, or updates the content of an existing blob. To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch). |
| uploadWithResponse(BlobParallelUploadOptions options, Duration timeout, Context context) |
Creates a new blob, or updates the content of an existing blob. To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch). |
| uploadWithResponse(InputStream data, long length, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String,String> metadata, AccessTier tier, BlobRequestConditions requestConditions, Duration timeout, Context context) |
Creates a new blob, or updates the content of an existing blob. To avoid overwriting, pass "*" to setIfNoneMatch(String ifNoneMatch). |