public class AzureBlobStreamReader
extends java.lang.Object
Constructor and Description |
---|
AzureBlobStreamReader(java.lang.String accountName,
java.lang.String accountKey,
java.lang.String containerName)
Implements streaming contents from Azure blob containers with HTTPS.
|
AzureBlobStreamReader(java.lang.String accountName,
java.lang.String accountKey,
java.lang.String containerName,
boolean useHttps)
Implements streaming contents from Azure blob containers.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStreamReader |
streamFileReader(java.lang.String blobPathFileName)
Read the file from the blob as
InputStreamReader . |
java.util.List<java.io.InputStreamReader> |
streamFolderReader(java.lang.String blobFolderPath)
Contents of the folder/blob as a stream.
|
javafx.util.Pair<java.util.List<java.lang.String>,java.util.List<java.io.InputStreamReader>> |
streamFolderReaderPair(java.lang.String blobFolderPath)
Contents of the folder/blob as a stream with it's file name.
|
javafx.util.Pair<java.util.List<java.lang.String>,java.util.List<java.io.InputStreamReader>> |
streamFolderReaderRegexPair(java.lang.String regex)
Contents of the folder/blob as a stream with it's file name.
|
public AzureBlobStreamReader(java.lang.String accountName, java.lang.String accountKey, java.lang.String containerName)
accountName
- Account name from your Access Keys.accountKey
- Account key from your Access Keys.containerName
- Container name you want to uploadFromFile or create.public AzureBlobStreamReader(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 java.io.InputStreamReader streamFileReader(java.lang.String blobPathFileName) throws java.net.URISyntaxException, com.microsoft.azure.storage.StorageException
InputStreamReader
.
Example:
AzureBlobStreamReader streamReader = new AzureBlobStreamReader("account name", "account key", "container name");
InputStreamReader reader = streamReader.streamFileReader("path/to/fileName.txt");
blobPathFileName
- Path with file name.java.net.URISyntaxException
- If an invalid account name is provided.com.microsoft.azure.storage.StorageException
- Storage error.public java.util.List<java.io.InputStreamReader> streamFolderReader(java.lang.String blobFolderPath) throws java.net.URISyntaxException, com.microsoft.azure.storage.StorageException
Example:
AzureBlobStreamReader streamReader = new AzureBlobStreamReader("account name", "account key", "container name");
List<InputStreamReader> reader = streamFolderReader.streamFileReader("path/to/folder");
blobFolderPath
- Path to the blob.InputStreamReader
java.net.URISyntaxException
- If an invalid account name is provided.com.microsoft.azure.storage.StorageException
- Storage error.public javafx.util.Pair<java.util.List<java.lang.String>,java.util.List<java.io.InputStreamReader>> streamFolderReaderPair(java.lang.String blobFolderPath) throws java.net.URISyntaxException, com.microsoft.azure.storage.StorageException
Example:
AzureBlobStreamReader streamReader = new AzureBlobStreamReader("account name", "account key", "container name");
Pair<List<String>, List<InputStreamReader>> reader = streamFolderReader.streamFolderReaderPair("path/to/folder");
blobFolderPath
- Path to the blob.java.net.URISyntaxException
- If an invalid account name is provided.com.microsoft.azure.storage.StorageException
- Storage error.public javafx.util.Pair<java.util.List<java.lang.String>,java.util.List<java.io.InputStreamReader>> streamFolderReaderRegexPair(java.lang.String regex) throws java.net.URISyntaxException, com.microsoft.azure.storage.StorageException
Example:
AzureBlobStreamReader streamReader = new AzureBlobStreamReader("account name", "account key", "container name");
Pair<List<String>, List<InputStreamReader>> reader = streamFolderReader.streamFolderReaderPair("regex");
regex
- Regular expression.java.net.URISyntaxException
- If an invalid account name is provided.com.microsoft.azure.storage.StorageException
- Storage error.