Class BlobOutputStream
java.lang.Object
java.io.OutputStream
com.azure.storage.common.StorageOutputStream
com.azure.storage.blob.specialized.BlobOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
BlobOutputStream allows for the uploading of data to a blob using a stream-like approach.
-
Field Summary
Fields inherited from class com.azure.storage.common.StorageOutputStream
lastError -
Method Summary
Modifier and TypeMethodDescriptionstatic BlobOutputStreamblockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String, String> metadata, AccessTier tier, BlobRequestConditions requestConditions) Creates a block blob output stream from a BlobAsyncClientstatic BlobOutputStreamblockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String, String> metadata, AccessTier tier, BlobRequestConditions requestConditions, com.azure.core.util.Context context) Creates a block blob output stream from a BlobAsyncClientstatic BlobOutputStreamblockBlobOutputStream(BlobAsyncClient client, BlockBlobOutputStreamOptions options, com.azure.core.util.Context context) Creates a block blob output stream from a BlobAsyncClientvoidclose()Closes this output stream and releases any system resources associated with this stream.Methods inherited from class com.azure.storage.common.StorageOutputStream
checkStreamState, dispatchWrite, flush, write, write, write, writeInternalMethods inherited from class java.io.OutputStream
nullOutputStream
-
Method Details
-
blockBlobOutputStream
public static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String, String> metadata, AccessTier tier, BlobRequestConditions requestConditions) Creates a block blob output stream from a BlobAsyncClient- Parameters:
client-BlobAsyncClientThe blob client.parallelTransferOptions-ParallelTransferOptionsused to configure buffered uploading.headers-BlobHttpHeadersmetadata- Metadata to associate with the blob. If there is leading or trailing whitespace in any metadata key or value, it must be removed or encoded.tier-AccessTierfor the destination blob.requestConditions-BlobRequestConditions- Returns:
BlobOutputStreamassociated with the blob.
-
blockBlobOutputStream
public static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String, String> metadata, AccessTier tier, BlobRequestConditions requestConditions, com.azure.core.util.Context context) Creates a block blob output stream from a BlobAsyncClient- Parameters:
client-BlobAsyncClientThe blob client.parallelTransferOptions-ParallelTransferOptionsused to configure buffered uploading.headers-BlobHttpHeadersmetadata- Metadata to associate with the blob. If there is leading or trailing whitespace in any metadata key or value, it must be removed or encoded.tier-AccessTierfor the destination blob.requestConditions-BlobRequestConditionscontext- Additional context that is passed through the Http pipeline during the service call.- Returns:
BlobOutputStreamassociated with the blob.
-
blockBlobOutputStream
public static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, BlockBlobOutputStreamOptions options, com.azure.core.util.Context context) Creates a block blob output stream from a BlobAsyncClient- Parameters:
client-BlobAsyncClientThe blob client.options-BlockBlobOutputStreamOptionscontext- Additional context that is passed through the Http pipeline during the service call.- Returns:
BlobOutputStreamassociated with the blob.
-
close
Closes this output stream and releases any system resources associated with this stream. If any data remains in the buffer it is committed to the service.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classStorageOutputStream- Throws:
IOException- If an I/O error occurs.
-