Class BlobHttpResponseParsers
- Namespace
- Microsoft.WindowsAzure.Storage.Blob.Protocol
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Provides a set of methods for parsing a response containing blob data from the Blob service.
public static class BlobHttpResponseParsers
- Inheritance
-
BlobHttpResponseParsers
- Inherited Members
Methods
GetCopyAttributes(HttpWebResponse)
Extracts a CopyState object from the headers of a web response.
public static CopyState GetCopyAttributes(HttpWebResponse response)
Parameters
response
HttpWebResponseThe HTTP web response.
Returns
GetDeletionStatus(string)
Determines if a blob has been deleted.
public static bool GetDeletionStatus(string deletedHeader)
Parameters
deletedHeader
stringString giving the deletion status of the blob
Returns
- bool
true
if blob has been deleted orfalse
if not.
GetIncrementalCopyStatus(string)
Determines if a blob in an incremental copy.
public static bool GetIncrementalCopyStatus(string incrementalCopyHeader)
Parameters
incrementalCopyHeader
stringString giving the incremental copy status of the blob
Returns
- bool
true
if blob is an incremental copy orfalse
if not.
GetLeaseDuration(HttpWebResponse)
Extracts the lease duration from a web response.
public static LeaseDuration GetLeaseDuration(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- LeaseDuration
A LeaseDuration enumeration from the web response.
Remarks
If the appropriate header is not present, a status of Unspecified is returned.
Exceptions
- ArgumentException
The header contains an unrecognized value.
GetLeaseId(HttpWebResponse)
Extracts the lease ID header from a web response.
public static string GetLeaseId(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- string
The lease ID.
GetLeaseState(HttpWebResponse)
Extracts the lease state from a web response.
public static LeaseState GetLeaseState(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- LeaseState
A LeaseState enumeration from the web response.
Remarks
If the appropriate header is not present, a status of Unspecified is returned.
Exceptions
- ArgumentException
The header contains an unrecognized value.
GetLeaseStatus(HttpWebResponse)
Extracts the lease status from a web response.
public static LeaseStatus GetLeaseStatus(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- LeaseStatus
A LeaseStatus enumeration from the web response.
Remarks
If the appropriate header is not present, a status of Unspecified is returned.
Exceptions
- ArgumentException
The header contains an unrecognized value.
GetMetadata(HttpWebResponse)
Gets the user-defined metadata.
public static IDictionary<string, string> GetMetadata(HttpWebResponse response)
Parameters
response
HttpWebResponseThe response from server.
Returns
- IDictionary<string, string>
A IDictionary of the metadata.
GetProperties(HttpWebResponse)
Gets the blob's properties from the response.
public static BlobProperties GetProperties(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- BlobProperties
The blob's properties.
GetRemainingLeaseTime(HttpWebResponse)
Extracts the remaining lease time from a web response.
public static int? GetRemainingLeaseTime(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- int?
The remaining lease time, in seconds.
GetRequestId(HttpWebResponse)
Gets the request ID from the response.
public static string GetRequestId(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- string
A unique value associated with the request.
GetServerEncrypted(string)
Determines if a blob is listed as server-side encypted.
public static bool GetServerEncrypted(string encryptionHeader)
Parameters
encryptionHeader
stringString giving the status of server encryption.
Returns
- bool
true
if blob encrypted orfalse
if not.
GetSnapshotTime(HttpWebResponse)
Gets the snapshot timestamp from the response.
public static string GetSnapshotTime(HttpWebResponse response)
Parameters
response
HttpWebResponseThe web response.
Returns
- string
The snapshot timestamp.
ReadAccountProperties(HttpWebResponse)
Reads account properties from a HttpWebResponse.
public static AccountProperties ReadAccountProperties(HttpWebResponse response)
Parameters
response
HttpWebResponseThe HttpWebResponse from which to read the account properties.
Returns
- AccountProperties
The account properties stored in the headers.
ReadServiceProperties(Stream)
Reads service properties from a stream.
public static ServiceProperties ReadServiceProperties(Stream inputStream)
Parameters
inputStream
StreamThe stream from which to read the service properties.
Returns
- ServiceProperties
The service properties stored in the stream.
ReadServiceStats(Stream)
Reads service stats from a stream.
public static ServiceStats ReadServiceStats(Stream inputStream)
Parameters
inputStream
StreamThe stream from which to read the service stats.
Returns
- ServiceStats
The service stats stored in the stream.