org.soyatec.windowsazure.blob
Interface IPageBlob

All Superinterfaces:
IBlob

public interface IPageBlob
extends IBlob

This interface representing page blobs, which are optimized for random read/write operations and which provide the ability to write to a range of bytes in a blob. Page blobs are a collection of pages. A page is a range of data that is identified by its offset from the start of the blob. http://msdn.microsoft.com/en-us/library/ee691964.aspx


Method Summary
 IBlobContents getContents(BlobStream stream, IPageRange range)
          Get the blob content with range information
 java.util.List<org.soyatec.windowsazure.blob.internal.PageRange> getPageRegions(org.soyatec.windowsazure.internal.util.NameValueCollection headerParameters)
          This operation returns the list of valid page ranges for a page blob or snapshot.
 void writePages(BlobStream pageData, IPageRange range, org.soyatec.windowsazure.internal.util.NameValueCollection headerParameters)
          This operation writes a range of pages to a page blob.
 
Methods inherited from interface org.soyatec.windowsazure.blob.IBlob
createSnapshot, getContents, getContents, getProperties, getProperties, setContents, setProperties, updateIfNotModified
 

Method Detail

getPageRegions

java.util.List<org.soyatec.windowsazure.blob.internal.PageRange> getPageRegions(org.soyatec.windowsazure.internal.util.NameValueCollection headerParameters)
                                                                                throws StorageException
This operation returns the list of valid page ranges for a page blob or snapshot.

Parameters:
headerParameters -
Returns:
Throws:
StorageException

writePages

void writePages(BlobStream pageData,
                IPageRange range,
                org.soyatec.windowsazure.internal.util.NameValueCollection headerParameters)
                throws StorageException
This operation writes a range of pages to a page blob.

Parameters:
pageData - The stream of page data.
range - For a page update operation, the page range can be up to 4 MB in size. For a page clear operation, the page range can be up to the value of the blob's full size. Given that pages must be aligned with 512-byte boundaries, the start offset must be a modulus of 512 and the end offset must be a modulus of 512 ¨C 1. Examples of valid byte ranges are 0-511, 512-1023, etc. The Blob service accepts only a single byte range for the Range header, and the byte range must be specified in the following format: bytes=startByte-endByte.
headerParameters - The optional header request parameters.
Throws:
StorageException

getContents

IBlobContents getContents(BlobStream stream,
                          IPageRange range)
                          throws StorageException
Get the blob content with range information

Parameters:
stream - The stream for hold content
range - the range to be read
Returns:
the blob content
Throws:
StorageException