microsoft-azure-storage/src/com/microsoft/azure/storage/NameValidator.java
public static void validateBlobName(String blobName) {
		if (Utility.isNullOrEmptyOrWhitespace(blobName)) {
			throw new IllegalArgumentException(String.format(Utility.LOCALE_US, SR.RESOURCE_NAME_EMPTY, SR.BLOB));
		}

		if (blobName.length() < NameValidator.BLOB_FILE_DIRECTORY_MIN_LENGTH || blobName.length() > NameValidator.BLOB_MAX_LENGTH) {
			throw new IllegalArgumentException(String.format(Utility.LOCALE_US, SR.INVALID_RESOURCE_NAME_LENGTH, SR.BLOB, NameValidator.BLOB_FILE_DIRECTORY_MIN_LENGTH, NameValidator.BLOB_MAX_LENGTH));
		}
		
		int slashCount =  0;
		for (int i = 0; i < blobName.length(); i++)
		{
			if (blobName.charAt(i) == '/')
			{
				slashCount++;
			}
		}
		
		if (slashCount >= 254)
		{
			throw new IllegalArgumentException(SR.TOO_MANY_PATH_SEGMENTS);
		}
	}
public static void validateBlobName(String blobName) {
		if (Utility.isNullOrEmptyOrWhitespace(blobName)) {
			throw new IllegalArgumentException(String.format(Utility.LOCALE_US, SR.RESOURCE_NAME_EMPTY, SR.BLOB));
		}

		if (blobName.length() < NameValidator.BLOB_FILE_DIRECTORY_MIN_LENGTH || blobName.length() > NameValidator.BLOB_MAX_LENGTH) {
			throw new IllegalArgumentException(String.format(Utility.LOCALE_US, SR.INVALID_RESOURCE_NAME_LENGTH, SR.BLOB, NameValidator.BLOB_FILE_DIRECTORY_MIN_LENGTH, NameValidator.BLOB_MAX_LENGTH));
		}
		
		int slashCount =  0;
		for (int i = 0; i < blobName.length(); i++)
		{
			if (blobName.charAt(i) == '/')
			{
				slashCount++;
			}
		}
		
		if (slashCount >= 254)
		{
			throw new IllegalArgumentException(SR.TOO_MANY_PATH_SEGMENTS);
		}
	}
Checks if a blob name is valid.

@param blobName
A String representing the blob name to validate.