public class AzureBlobDelete
extends java.lang.Object
Constructor and Description |
---|
AzureBlobDelete(java.lang.String accountName,
java.lang.String accountKey,
java.lang.String containerName)
Implements downloading contents from Azure blob containers with HTTPS as
true by default. |
AzureBlobDelete(java.lang.String accountName,
java.lang.String accountKey,
java.lang.String containerName,
boolean useHttps)
Implements deleting files and blobs.
|
Modifier and Type | Method and Description |
---|---|
java.net.URI |
deleteBlob(java.lang.String blobFolderPath)
Permanently deletes the blob and it's contents.
|
void |
deleteContainer()
Deletes the container provided while creating the instance instance.
|
java.net.URI |
deleteFile(java.lang.String blobPathFileName)
Deletes a file in the given path with the file name.
|
public AzureBlobDelete(java.lang.String accountName, java.lang.String accountKey, java.lang.String containerName, boolean useHttps)
accountName
- Account name from your Access Keys.accountKey
- Account key from your Access Keys.containerName
- Container name you want to uploadFromFile or create.useHttps
- true
to use HTTPS to connect to the storage service endpoints;
otherwise, false
. Defaults to true
.public AzureBlobDelete(java.lang.String accountName, java.lang.String accountKey, java.lang.String containerName)
true
by default.accountName
- Account name from your Access Keys.accountKey
- Account key from your Access Keys.containerName
- Container name you want to uploadFromFile or create.public java.net.URI deleteFile(java.lang.String blobPathFileName) throws java.net.URISyntaxException, com.microsoft.azure.storage.StorageException
Example:
AzureBlobDelete blobDelete = new AzureBlobDelete("account name", "account key", "container name");
URI uri = blobDelete.deleteFile("blob/path/fileName.txt");
blobPathFileName
- Blob path with file name to delete.java.net.URISyntaxException
- Is used by CloudStorageAccount
.com.microsoft.azure.storage.StorageException
- Is used by CloudStorageAccount
.public java.net.URI deleteBlob(java.lang.String blobFolderPath) throws java.net.URISyntaxException, com.microsoft.azure.storage.StorageException
Example:
AzureBlobDelete blobDelete = new AzureBlobDelete("account name", "account key", "container name");
URI uri = blobDelete.deleteBlob("blob/path/");
blobFolderPath
- Path to file or folder.java.net.URISyntaxException
- Is used by CloudStorageAccount
.com.microsoft.azure.storage.StorageException
- Is used by CloudStorageAccount
.public void deleteContainer() throws java.net.URISyntaxException, com.microsoft.azure.storage.StorageException
Example:
AzureBlobDelete blobDelete = new AzureBlobDelete("account name", "account key", "container name");
blobDelete.deleteContainer();
java.net.URISyntaxException
- Is used by CloudStorageAccount
.com.microsoft.azure.storage.StorageException
- Is used by CloudStorageAccount
.