microsoft-azure-storage/src/com/microsoft/azure/storage/CloudStorageAccount.java
private static StorageUri getDefaultStorageUri(final String scheme, final String accountName, final String service)
            throws URISyntaxException {
        if (Utility.isNullOrEmpty(scheme)) {
            throw new IllegalArgumentException(SR.SCHEME_NULL_OR_EMPTY);
        }

        if (Utility.isNullOrEmpty(accountName)) {
            throw new IllegalArgumentException(SR.ACCOUNT_NAME_NULL_OR_EMPTY);
        }

        URI primaryUri = new URI(String.format(PRIMARY_ENDPOINT_FORMAT, scheme, accountName, service));
        URI secondaryUri = new URI(
                String.format(SECONDARY_ENDPOINT_FORMAT, scheme, accountName, SECONDARY_LOCATION_ACCOUNT_SUFFIX, service));
        return new StorageUri(primaryUri, secondaryUri);
    }
private static StorageUri getDefaultStorageUri(final String scheme, final String accountName, final String service)
            throws URISyntaxException {
        if (Utility.isNullOrEmpty(scheme)) {
            throw new IllegalArgumentException(SR.SCHEME_NULL_OR_EMPTY);
        }

        if (Utility.isNullOrEmpty(accountName)) {
            throw new IllegalArgumentException(SR.ACCOUNT_NAME_NULL_OR_EMPTY);
        }

        URI primaryUri = new URI(String.format(PRIMARY_ENDPOINT_FORMAT, scheme, accountName, service));
        URI secondaryUri = new URI(
                String.format(SECONDARY_ENDPOINT_FORMAT, scheme, accountName, SECONDARY_LOCATION_ACCOUNT_SUFFIX, service));
        return new StorageUri(primaryUri, secondaryUri);
    }
Gets the default {@link StorageUri} using the specified service, protocol and account name.

@param scheme
The protocol to use.
@param accountName
The name of the storage account.
@param service
A String that represents the service's base DNS name.
@return The default {@link StorageUri}.