code: public static String getShareNameFromUri(final URI resourceAddress, final boolean usePathStyleUris) {
          return getResourceNameFromUri(resourceAddress, usePathStyleUris,
                  String.format("Invalid file address '%s', missing share information", resourceAddress));
      }
docs: Get the share name from address from the URI.
  
  @param resourceAddress
  The share Uri.
  @param usePathStyleUris
  a value indicating if the address is a path style uri.
  @return share name from address from the URI.
  @throws IllegalArgumentException