microsoft-azure-storage/src/com/microsoft/azure/storage/core/PathUtility.java
public static StorageUri getContainerURI(final StorageUri blobAddress, final boolean usePathStyleUris)
            throws URISyntaxException {
        final String containerName = getContainerNameFromUri(blobAddress.getPrimaryUri(), usePathStyleUris);

        final StorageUri containerUri = appendPathToUri(getServiceClientBaseAddress(blobAddress, usePathStyleUris),
                containerName);
        return containerUri;
    }
public static StorageUri getContainerURI(final StorageUri blobAddress, final boolean usePathStyleUris)
            throws URISyntaxException {
        final String containerName = getContainerNameFromUri(blobAddress.getPrimaryUri(), usePathStyleUris);

        final StorageUri containerUri = appendPathToUri(getServiceClientBaseAddress(blobAddress, usePathStyleUris),
                containerName);
        return containerUri;
    }
public static StorageUri getContainerURI ( final StorageUri blobAddress , final boolean usePathStyleUris ) throws URISyntaxException { final String containerName = getContainerNameFromUri ( blobAddress . getPrimaryUri ( ) , usePathStyleUris ) ; final StorageUri containerUri = appendPathToUri ( getServiceClientBaseAddress ( blobAddress , usePathStyleUris ) , containerName ) ; return containerUri ; }
Gets the container URI from a blob address

@param blobAddress
the blob address
@param usePathStyleUris
a value indicating if the address is a path style uri.
@return the container URI from a blob address
@throws URISyntaxException
Gets the container URI from a blob address