microsoft-azure-storage/src/com/microsoft/azure/storage/core/PathUtility.java
public static String getContainerNameFromUri(final URI resourceAddress, final boolean usePathStyleUris) {
        return getResourceNameFromUri(resourceAddress, usePathStyleUris,
                String.format("Invalid blob address '%s', missing container information", resourceAddress));
    }
public static String getContainerNameFromUri(final URI resourceAddress, final boolean usePathStyleUris) {
        return getResourceNameFromUri(resourceAddress, usePathStyleUris,
                String.format("Invalid blob address '%s', missing container information", resourceAddress));
    }
Get the container name from address from the URI.

@param resourceAddress
The container Uri.
@param usePathStyleUris
a value indicating if the address is a path style uri.
@return container name from address from the URI.
@throws IllegalArgumentException