CloudPageBlob Class
- java.
lang. Object - ListBlobItem
- CloudBlob
- com.
microsoft. azure. storage. blob. CloudPageBlob
- com.
public class CloudPageBlob extends CloudBlob
Represents a Microsoft Azure page blob.
Constructor Summary
Constructor | Description |
---|---|
CloudPageBlob(final CloudPageBlob otherBlob) |
Creates an instance of the class by copying values from another page blob. |
CloudPageBlob(final StorageUri blobAbsoluteUri) |
Creates an instance of the class using the specified absolute URI and storage service client. |
CloudPageBlob(final StorageUri blobAbsoluteUri, final StorageCredentials credentials) |
Creates an instance of the class using the specified absolute StorageUri and credentials. |
CloudPageBlob(final StorageUri blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials) |
Creates an instance of the class using the specified absolute StorageUri, snapshot ID, and credentials. |
CloudPageBlob(final URI blobAbsoluteUri) |
Creates an instance of the class using the specified absolute URI and storage service client. |
CloudPageBlob(final URI blobAbsoluteUri, final StorageCredentials credentials) |
Creates an instance of the class using the specified absolute URI and credentials. |
CloudPageBlob(final URI blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials) |
Creates an instance of the class using the specified absolute URI, snapshot ID, and credentials. |
CloudPageBlob(String blobName, String snapshotID, CloudBlobContainer container) |
Creates an instance of the class using the specified type, name, snapshot ID, and container. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
clearPages(final long offset, final long length)
Clears pages from a page blob. Calling releases the storage space used by the specified pages. Pages that have been cleared are no longer tracked as part of the page blob, and no longer incur a charge against the storage account. |
void |
clearPages(final long offset, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Clears pages from a page blob using the specified lease ID, request options, and operation context. Calling releases the storage space used by the specified pages. Pages that have been cleared are no longer tracked as part of the page blob, and no longer incur a charge against the storage account. |
void |
create(final long length)
Creates a page blob. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use the create(final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) overload with generateIfNotExistsCondition(). |
void |
create(final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Creates a page blob using the specified request options and operation context. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use generateIfNotExistsCondition(). |
void |
create(final long length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Creates a page blob using the specified request options and operation context. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use generateIfNotExistsCondition(). |
ArrayList<Page |
downloadPageRanges()
Returns a collection of page ranges and their starting and ending byte offsets. The start and end byte offsets for each page range are inclusive. |
ArrayList<Page |
downloadPageRanges(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Returns a collection of page ranges and their starting and ending byte offsets using the specified request options and operation context. |
List<Page |
downloadPageRanges(final long offset, final Long length)
Returns a collection of page ranges and their starting and ending byte offsets. |
List<Page |
downloadPageRanges(final long offset, final Long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Returns a collection of page ranges and their starting and ending byte offsets using the specified request options and operation context. |
List<Page |
downloadPageRangesDiff(final String previousSnapshot)
Gets the collection of page ranges that differ between a specified snapshot and this object. |
List<Page |
downloadPageRangesDiff(final String previousSnapshot, final Long offset, final Long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Gets the collection of page ranges that differ between a specified snapshot and this object. |
Blob |
openWriteExisting()
Opens an output stream object to write data to the page blob. The page blob must already exist and any existing data may be overwritten. |
Blob |
openWriteExisting(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob must already exist and any existing data may be overwritten. |
Blob |
openWriteNew(final long length)
Opens an output stream object to write data to the page blob. The page blob does not need to yet exist and will be created with the length specified. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error, please use the openWriteNew(final long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) overload with the appropriate AccessCondition. |
Blob |
openWriteNew(final long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob does not need to yet exist and will be created with the length specified.If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using generateIfNotExistsCondition(). |
Blob |
openWriteNew(final long length, final PremiumPageBlobTier premiumBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob does not need to yet exist and will be created with the length specified.If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using generateIfNotExistsCondition(). |
void |
putPagesFromURI(long offset, long length, final URI copySource, final Long sourceOffset)
Writes a PageRange, using the specified source URL. |
void |
putPagesFromURI(long offset, long length, final URI copySource, final Long sourceOffset, String md5, AccessCondition accessCondition, AccessCondition sourceAccessCondition, BlobRequestOptions options, OperationContext opContext)
Writes a PageRange, using the specified source URL. |
void |
resize(long size)
Resizes the page blob to the specified size. |
void |
resize(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Resizes the page blob to the specified size. |
void |
setStreamWriteSizeInBytes(final int streamWriteSizeInBytes)
Sets the number of bytes to buffer when writing to a BlobOutputStream. |
final String |
startCopy(final CloudPageBlob sourceBlob)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob. |
final String |
startCopy(final CloudPageBlob sourceBlob, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context. |
final String |
startCopy(final CloudPageBlob sourceBlob, final PremiumPageBlobTier premiumBlobTier, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified blob tier, access conditions, lease ID, request options, and operation context. |
final String |
startIncrementalCopy(final CloudPageBlob sourceSnapshot)
Requests the service to start an incremental copy of another page blob's contents, properties, and metadata to this blob. |
final String |
startIncrementalCopy(final CloudPageBlob sourceSnapshot, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context. |
final String |
startIncrementalCopy(final URI sourceSnapshot)
Requests the service to start an incremental copy of another page blob's contents, properties, and metadata to this blob. |
final String |
startIncrementalCopy(final URI sourceSnapshot, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context. |
void | updateSequenceNumberFromResponse(HttpURLConnection request) |
void |
upload(final InputStream sourceStream, final long length)
Uploads the source stream data to the page blob. If the blob already exists on the service, it will be overwritten. |
void |
upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the source stream data to the page blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten. |
void |
upload(final InputStream sourceStream, final long length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the source stream data to the page blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten. |
void |
uploadFromByteArray(final byte[] buffer, final int offset, final int length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads a blob from data in a byte array. If the blob already exists on the service, it will be overwritten. |
void |
uploadFromFile(final String path, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads a blob from a file. If the blob already exists on the service, it will be overwritten. |
void |
uploadPages(final InputStream sourceStream, final long offset, final long length)
Uploads a range of contiguous pages, up to 4 MB in size, at the specified offset in the page blob. |
void |
uploadPages(final InputStream sourceStream, final long offset, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads a range of contiguous pages, up to 4 MB in size, at the specified offset in the page blob, using the specified lease ID, request options, and operation context. |
void |
uploadPremiumPageBlobTier(final PremiumPageBlobTier premiumBlobTier)
Sets the blob tier on a page blob on a premium storage account. |
void |
uploadPremiumPageBlobTier(final PremiumPageBlobTier premiumBlobTier, BlobRequestOptions options, OperationContext opContext)
Sets the tier on a page blob on a premium storage account. |
Inherited Members
Constructor Details
CloudPageBlob
public CloudPageBlob(final CloudPageBlob otherBlob)
Creates an instance of the class by copying values from another page blob.
Parameters:
CloudPageBlob
object which represents the page blob to copy.
CloudPageBlob
public CloudPageBlob(final StorageUri blobAbsoluteUri)
Creates an instance of the class using the specified absolute URI and storage service client.
Parameters:
Throws:
CloudPageBlob
public CloudPageBlob(final StorageUri blobAbsoluteUri, final StorageCredentials credentials)
Creates an instance of the class using the specified absolute StorageUri and credentials.
Parameters:
Throws:
CloudPageBlob
public CloudPageBlob(final StorageUri blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials)
Creates an instance of the class using the specified absolute StorageUri, snapshot ID, and credentials.
Parameters:
String
that represents the snapshot version, if applicable.
Throws:
CloudPageBlob
public CloudPageBlob(final URI blobAbsoluteUri)
Creates an instance of the class using the specified absolute URI and storage service client.
Parameters:
java.net.URI
object which represents the absolute URI to the blob.
Throws:
CloudPageBlob
public CloudPageBlob(final URI blobAbsoluteUri, final StorageCredentials credentials)
Creates an instance of the class using the specified absolute URI and credentials.
Parameters:
java.net.URI
object that represents the absolute URI to the blob.
Throws:
CloudPageBlob
public CloudPageBlob(final URI blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials)
Creates an instance of the class using the specified absolute URI, snapshot ID, and credentials.
Parameters:
java.net.URI
object that represents the absolute URI to the blob.
String
that represents the snapshot version, if applicable.
Throws:
CloudPageBlob
protected CloudPageBlob(String blobName, String snapshotID, CloudBlobContainer container)
Creates an instance of the class using the specified type, name, snapshot ID, and container.
Parameters:
String
that represents the snapshot version, if applicable.
Throws:
Method Details
clearPages
public void clearPages(final long offset, final long length)
Clears pages from a page blob.
Calling releases the storage space used by the specified pages. Pages that have been cleared are no longer tracked as part of the page blob, and no longer incur a charge against the storage account.
Parameters:
Throws:
clearPages
public void clearPages(final long offset, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Clears pages from a page blob using the specified lease ID, request options, and operation context.
Calling releases the storage space used by the specified pages. Pages that have been cleared are no longer tracked as part of the page blob, and no longer incur a charge against the storage account.
Parameters:
long
which represents the offset, in bytes, at which to begin clearing pages. This value must be a multiple of 512.
long
which represents the length, in bytes, of the data range to be cleared. This value must be a multiple of 512.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
create
public void create(final long length)
Creates a page blob. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use the create(final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) overload with generateIfNotExistsCondition().
Parameters:
long
which represents the size, in bytes, of the page blob.
Throws:
create
public void create(final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Creates a page blob using the specified request options and operation context. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use generateIfNotExistsCondition().
Parameters:
long
which represents the size, in bytes, of the page blob.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
create
public void create(final long length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Creates a page blob using the specified request options and operation context. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use generateIfNotExistsCondition().
Parameters:
long
which represents the size, in bytes, of the page blob.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
downloadPageRanges
public ArrayList
Returns a collection of page ranges and their starting and ending byte offsets.
The start and end byte offsets for each page range are inclusive.
Returns:
ArrayList
object which represents the set of page ranges and their starting and ending byte offsets.Throws:
downloadPageRanges
public ArrayList
Returns a collection of page ranges and their starting and ending byte offsets using the specified request options and operation context.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
ArrayList
object which represents the set of page ranges and their starting and ending byte offsets.Throws:
downloadPageRanges
public List
Returns a collection of page ranges and their starting and ending byte offsets.
Parameters:
Returns:
List
object which represents the set of page ranges and their starting and ending byte offsets.Throws:
downloadPageRanges
public List
Returns a collection of page ranges and their starting and ending byte offsets using the specified request options and operation context.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
List
object which represents the set of page ranges and their starting and ending byte offsets.Throws:
downloadPageRangesDiff
public List
Gets the collection of page ranges that differ between a specified snapshot and this object.
Parameters:
Returns:
List
object containing the set of differing page ranges.Throws:
downloadPageRangesDiff
public List
Gets the collection of page ranges that differ between a specified snapshot and this object.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
List
object containing the set of differing page ranges.Throws:
openWriteExisting
public BlobOutputStream openWriteExisting()
Opens an output stream object to write data to the page blob. The page blob must already exist and any existing data may be overwritten.
Returns:
Throws:
openWriteExisting
public BlobOutputStream openWriteExisting(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob must already exist and any existing data may be overwritten.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
Throws:
openWriteNew
public BlobOutputStream openWriteNew(final long length)
Opens an output stream object to write data to the page blob. The page blob does not need to yet exist and will be created with the length specified. If the blob already exists on the service, it will be overwritten.
To avoid overwriting and instead throw an error, please use the openWriteNew(final long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) overload with the appropriate AccessCondition.
Parameters:
long
which represents the length, in bytes, of the stream to create. This value must be a multiple of 512.
Returns:
Throws:
openWriteNew
public BlobOutputStream openWriteNew(final long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob does not need to yet exist and will be created with the length specified.If the blob already exists on the service, it will be overwritten.
To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using generateIfNotExistsCondition().
Parameters:
long
which represents the length, in bytes, of the stream to create. This value must be a multiple of 512.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
Throws:
openWriteNew
public BlobOutputStream openWriteNew(final long length, final PremiumPageBlobTier premiumBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob does not need to yet exist and will be created with the length specified.If the blob already exists on the service, it will be overwritten.
To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using generateIfNotExistsCondition().
Parameters:
long
which represents the length, in bytes, of the stream to create. This value must be a multiple of 512.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
Throws:
putPagesFromURI
public void putPagesFromURI(long offset, long length, final URI copySource, final Long sourceOffset)
Writes a PageRange, using the specified source URL.
Parameters:
URI
of the source data. It can point to any Azure Blob or File that is public or the URL can include a shared access signature.
long
which represents the offset to use as the starting point for the source. The length of data to copy from the source will be taken from the source length parameter.
Throws:
putPagesFromURI
public void putPagesFromURI(long offset, long length, final URI copySource, final Long sourceOffset, String md5, AccessCondition accessCondition, AccessCondition sourceAccessCondition, BlobRequestOptions options, OperationContext opContext)
Writes a PageRange, using the specified source URL.
Parameters:
URI
of the source data. It can point to any Azure Blob or File that is public or the URL can include a shared access signature.
long
which represents the offset to use as the starting point for the source. The length of data to copy from the source will be taken from the source length parameter.
String
which represents the MD5 hash for the data.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
resize
public void resize(long size)
Resizes the page blob to the specified size.
Parameters:
long
which represents the size of the page blob, in bytes.
Throws:
resize
public void resize(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Resizes the page blob to the specified size.
Parameters:
long
which represents the size of the page blob, in bytes.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
setStreamWriteSizeInBytes
public void setStreamWriteSizeInBytes(final int streamWriteSizeInBytes)
Sets the number of bytes to buffer when writing to a BlobOutputStream.
Parameters:
int
which represents the maximum number of bytes to buffer when writing to a page blob stream. This value must be a multiple of 512 and less than or equal to 4 MB.
Throws:
streamWriteSizeInBytes
is less than 512, greater than 4 MB, or not a multiple or 512.
startCopy
public final String startCopy(final CloudPageBlob sourceBlob)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob.
Parameters:
CloudPageBlob
object that represents the source blob to copy.
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startCopy
public final String startCopy(final CloudPageBlob sourceBlob, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context.
Parameters:
CloudPageBlob
object that represents the source blob to copy.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startCopy
public final String startCopy(final CloudPageBlob sourceBlob, final PremiumPageBlobTier premiumBlobTier, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified blob tier, access conditions, lease ID, request options, and operation context.
Parameters:
CloudPageBlob
object that represents the source blob to copy.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startIncrementalCopy
public final String startIncrementalCopy(final CloudPageBlob sourceSnapshot)
Requests the service to start an incremental copy of another page blob's contents, properties, and metadata to this blob.
Parameters:
CloudPageBlob
object that represents the source blob to copy. Must be a snapshot.
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startIncrementalCopy
public final String startIncrementalCopy(final CloudPageBlob sourceSnapshot, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context.
Parameters:
CloudPageBlob
object that represents the source blob to copy. Must be a snapshot.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startIncrementalCopy
public final String startIncrementalCopy(final URI sourceSnapshot)
Requests the service to start an incremental copy of another page blob's contents, properties, and metadata to this blob.
Parameters:
CloudPageBlob
object that represents the source blob to copy. Must be a snapshot.
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startIncrementalCopy
public final String startIncrementalCopy(final URI sourceSnapshot, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context.
Parameters:
CloudPageBlob
object that represents the source blob to copy. Must be a snapshot.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
updateSequenceNumberFromResponse
protected void updateSequenceNumberFromResponse(HttpURLConnection request)
Parameters:
upload
public void upload(final InputStream sourceStream, final long length)
Uploads the source stream data to the page blob. If the blob already exists on the service, it will be overwritten.
Parameters:
long
which represents the length, in bytes, of the stream data, must be non zero and a multiple of 512.
Throws:
upload
public void upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the source stream data to the page blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.
Parameters:
long
which represents the length, in bytes, of the stream data. This must be great than zero and a multiple of 512.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
upload
public void upload(final InputStream sourceStream, final long length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the source stream data to the page blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.
Parameters:
long
which represents the length, in bytes, of the stream data. This must be great than zero and a multiple of 512.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadFromByteArray
public void uploadFromByteArray(final byte[] buffer, final int offset, final int length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads a blob from data in a byte array. If the blob already exists on the service, it will be overwritten.
Parameters:
byte
array which represents the data to write to the blob.
int
which represents the offset of the byte array from which to start the data upload.
int
which represents the number of bytes to upload from the input buffer.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadFromFile
public void uploadFromFile(final String path, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads a blob from a file. If the blob already exists on the service, it will be overwritten.
Parameters:
String
which represents the path to the file to be uploaded.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadPages
public void uploadPages(final InputStream sourceStream, final long offset, final long length)
Uploads a range of contiguous pages, up to 4 MB in size, at the specified offset in the page blob.
Parameters:
long
which represents the offset, in number of bytes, at which to begin writing the data. This value must be a multiple of 512.
long
which represents the length, in bytes, of the data to write. This value must be a multiple of 512.
Throws:
uploadPages
public void uploadPages(final InputStream sourceStream, final long offset, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads a range of contiguous pages, up to 4 MB in size, at the specified offset in the page blob, using the specified lease ID, request options, and operation context.
Parameters:
long
which represents the offset, in number of bytes, at which to begin writing the data. This value must be a multiple of 512.
long
which represents the length, in bytes, of the data to write. This value must be a multiple of 512.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadPremiumPageBlobTier
public void uploadPremiumPageBlobTier(final PremiumPageBlobTier premiumBlobTier)
Sets the blob tier on a page blob on a premium storage account.
Parameters:
Throws:
uploadPremiumPageBlobTier
public void uploadPremiumPageBlobTier(final PremiumPageBlobTier premiumBlobTier, BlobRequestOptions options, OperationContext opContext)
Sets the tier on a page blob on a premium storage account.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
Applies to
Azure SDK for Java