StorageUri Class

  • java.lang.Object
    • com.microsoft.azure.storage.StorageUri

public class StorageUri

Holds a list of URIs that represents the storage resource.

Constructor Summary

Constructor Description
StorageUri(URI primaryUri)

Initializes a new instance of the StorageUri class using the specified URI.

StorageUri(URI primaryUri, URI secondaryUri)

Initializes a new instance of the StorageUri class using the specified primary and secondary URIs.

Method Summary

Modifier and Type Method and Description
boolean equals(Object obj)
boolean equals(StorageUri other)

Indicates whether a StorageUri object is equal to the current StorageUri object.

URI getPrimaryUri()

Gets the endpoint for the primary location for the storage account.

String getQuery()

Returns the decoded query component of this StorageUri object.

URI getSecondaryUri()

Gets the endpoint for the secondary location for the storage account.

URI getUri(StorageLocation location)

Gets the URI for a specified StorageLocation.

int hashCode()
boolean isAbsolute()

Indicates whether this StorageUri is absolute.

String toString()
boolean validateLocationMode(LocationMode mode)

Validate that a URI exists for the specified .

Constructor Details

StorageUri

public StorageUri(URI primaryUri)

Initializes a new instance of the StorageUri class using the specified URI.

Parameters:

primaryUri - A java.net.URI object for the primary URI.

StorageUri

public StorageUri(URI primaryUri, URI secondaryUri)

Initializes a new instance of the StorageUri class using the specified primary and secondary URIs.

Parameters:

primaryUri - A java.net.URI object for the primary URI.
secondaryUri - A java.net.URI object for the secondary URI.

Method Details

equals

public boolean equals(Object obj)

Parameters:

obj

equals

public boolean equals(StorageUri other)

Indicates whether a StorageUri object is equal to the current StorageUri object.

Parameters:

other - A reference to a StorageUri object to compare.

Returns:

true if this object is the same as the other argument; otherwise false.

getPrimaryUri

public URI getPrimaryUri()

Gets the endpoint for the primary location for the storage account.

Returns:

A java.net.URI object for the primary URI.

getQuery

public String getQuery()

Returns the decoded query component of this StorageUri object.

Returns:

A String which contains the decoded query component of the current StorageUri, or null if the query is undefined.

getSecondaryUri

public URI getSecondaryUri()

Gets the endpoint for the secondary location for the storage account.

Returns:

A java.net.URI object for the secondary URI.

getUri

public URI getUri(StorageLocation location)

Gets the URI for a specified StorageLocation.

Parameters:

location - The StorageLocation object for which to retrieve a URI.

Returns:

A java.net.URI object for the specified StorageLocation.

hashCode

public int hashCode()

isAbsolute

public boolean isAbsolute()

Indicates whether this StorageUri is absolute.

Returns:

true if the current StorageUri is absolute; otherwise false.

toString

public String toString()

validateLocationMode

public boolean validateLocationMode(LocationMode mode)

Validate that a URI exists for the specified .

Parameters:

mode - The LocationMode to validate.

Returns:

true if a URI exists for the specified mode; otherwise false.

Applies to