Class Utils


  • public final class Utils
    extends Object
    • Method Detail

      • getBlobContainer

        public static com.microsoft.azure.storage.blob.CloudBlobContainer getBlobContainer​(@NotNull
                                                                                           @NotNull String connectionString,
                                                                                           @NotNull
                                                                                           @NotNull String containerName)
                                                                                    throws DataStoreException
        Throws:
        DataStoreException
      • getBlobContainer

        public static com.microsoft.azure.storage.blob.CloudBlobContainer getBlobContainer​(@NotNull
                                                                                           @NotNull String connectionString,
                                                                                           @NotNull
                                                                                           @NotNull String containerName,
                                                                                           @Nullable
                                                                                           @Nullable com.microsoft.azure.storage.blob.BlobRequestOptions requestOptions)
                                                                                    throws DataStoreException
        Throws:
        DataStoreException
      • setProxyIfNeeded

        public static void setProxyIfNeeded​(Properties properties)
      • getRetryPolicy

        public static com.microsoft.azure.storage.RetryPolicy getRetryPolicy​(String maxRequestRetry)
      • getConnectionStringFromProperties

        public static String getConnectionStringFromProperties​(Properties properties)
      • getConnectionStringForSas

        public static String getConnectionStringForSas​(String sasUri,
                                                       String blobEndpoint,
                                                       String accountName)
      • getConnectionString

        public static String getConnectionString​(String accountName,
                                                 String accountKey)
      • getConnectionString

        public static String getConnectionString​(String accountName,
                                                 String accountKey,
                                                 String blobEndpoint)
      • readConfig

        public static Properties readConfig​(String fileName)
                                     throws IOException
        Read a configuration properties file. If the file name ends with ";burn", the file is deleted after reading.
        Parameters:
        fileName - the properties file name
        Returns:
        the properties
        Throws:
        IOException - if the file doesn't exist