Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Manage Azure Storage services including Blob, File Shares, Queues, Tables, and Data Lake
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-storage-blob-java.md
1# Blob Storage — Java SDK Quick Reference23> Condensed from **azure-storage-blob-java**. Full patterns (SAS tokens,4> streaming, lease management, parallel uploads, proxy config)5> in the **azure-storage-blob-java** plugin skill if installed.67## Install8```xml9<dependency>10<groupId>com.azure</groupId>11<artifactId>azure-storage-blob</artifactId>12<version>12.33.0</version>13</dependency>14<dependency>15<groupId>com.azure</groupId>16<artifactId>azure-identity</artifactId>17</dependency>18```1920## Quick Start21```java22import com.azure.storage.blob.BlobServiceClientBuilder;23import com.azure.identity.DefaultAzureCredentialBuilder;24var serviceClient = new BlobServiceClientBuilder()25.endpoint("<storage-account-url>")26.credential(new DefaultAzureCredentialBuilder().build())27.buildClient();28```2930## Best Practices31- Use DefaultAzureCredential for **local development only** — in production, use ManagedIdentityCredential. See [auth-best-practices.md](../auth-best-practices.md)32- Use `BinaryData.fromString()` for string uploads33- Use `createIfNotExists()` for idempotent container creation34- Use `BlobParallelUploadOptions` for large file uploads with headers/metadata35- Use `BlobInputStream`/`BlobOutputStream` for streaming large blobs36- Handle `BlobStorageException` — check `getStatusCode()` and `getErrorCode()`37