CloudAppendBlob Class

Definition

Represents a Microsoft Azure Append Blob.

public class CloudAppendBlob extends CloudBlob
Inheritance
java.lang.Object
CloudAppendBlob

Inherited Members

Constructors

CloudAppendBlob(final CloudAppendBlob otherBlob)

Creates an instance of the class by copying values from another append blob.

CloudAppendBlob(final StorageUri blobAbsoluteUri)

Creates an instance of the class using the specified absolute URI and storage service client.

CloudAppendBlob(final StorageUri blobAbsoluteUri, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute StorageUri and credentials.

CloudAppendBlob(final StorageUri blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute StorageUri, snapshot ID, and credentials.

CloudAppendBlob(final URI blobAbsoluteUri)

Creates an instance of the class using the specified absolute URI and storage service client.

CloudAppendBlob(final URI blobAbsoluteUri, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute URI and credentials.

CloudAppendBlob(final URI blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute URI, snapshot ID, and credentials.

CloudAppendBlob(String blobName, String snapshotID, CloudBlobContainer container)

Creates an instance of the class using the specified type, name, snapshot ID, and container.

Methods

append(InputStream sourceStream, final long length)

Appends a stream to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

append(InputStream sourceStream, final long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Appends a stream to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

appendBlock(final InputStream sourceStream, final long length)

Commits a new block of data to the end of the blob.

appendBlock(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Commits a new block of data to the end of the blob.

appendFromByteArray(final byte[] buffer, final int offset, final int length)

Appends the contents of a byte array to an append blob.This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

appendFromByteArray(final byte[] buffer, final int offset, final int length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Appends the contents of a byte array to an append blob.This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

appendFromFile(final String path)

Appends a file to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

appendFromFile(final String path, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Appends a file to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

appendText(final String content)

Appends a string of text to an append blob using the platform's default encoding. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

appendText(final String content, final String charsetName, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Appends a string of text to an append blob using the specified encoding. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

createOrReplace()

Creates an empty append blob. If the blob already exists, this will replace it.

To avoid overwriting and instead throw an error, please use the createOrReplace(AccessCondition, BlobRequestOptions, OperationContext) overload with the appropriate AccessCondition.

createOrReplace(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Creates an append blob using the specified request options and operation context. If the blob already exists, this will replace it.

To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using AccessCondition#generateIfNotExistsCondition().

openWriteExisting()

Opens an output stream object to write data to the append blob. The append blob must already exist and will be appended to.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

openWriteExisting(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Opens an output stream object to write data to the append blob, using the specified lease ID, request options and operation context. The append blob must already exist and will be appended to.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

openWriteNew()

Opens an output stream object to write data to the append blob. The append blob does not need to yet exist. If the blob already exists, this will replace it.

To avoid overwriting and instead throw an error, please use the openWriteNew(AccessCondition, BlobRequestOptions, OperationContext) overload with the appropriate AccessCondition.

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

openWriteNew(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Opens an output stream object to write data to the append blob, using the specified lease ID, request options and operation context. The append blob does not need to yet exist. If the blob already exists, this will replace it.

To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using AccessCondition#generateIfNotExistsCondition().

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

setStreamWriteSizeInBytes(final int streamWriteSizeInBytes)

Sets the number of bytes to buffer when writing to a BlobOutputStream.

startCopy(final CloudAppendBlob sourceBlob)

Requests the service to start copying a append blob's contents, properties, and metadata to a new append blob.

startCopy(final CloudAppendBlob sourceBlob, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)

Requests the service to start copying a append blob's contents, properties, and metadata to a new append blob, using the specified access conditions, lease ID, request options, and operation context.

upload(final InputStream sourceStream, final long length)

Uploads the source stream data to the append blob. If the blob already exists on the service, it will be overwritten.

If you want to append data to an already existing blob, please see appendBlock(InputStream, long).

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads the source stream data to the append blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.

If you want to append data to an already existing blob, please see appendBlock(InputStream, long).

If you are doing writes in a single writer scenario, please look at BlobRequestOptions#setAbsorbConditionalErrorsOnRetry(Boolean) and see if setting this flag to is acceptable for you.

Applies to