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
public abstract class BlobOutputStream extends StorageOutputStream
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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, writeInternal
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
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
public void close() throws IOExceptionCloses 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.
-
-