Class Utils


  • public final class Utils
    extends Object
    Amazon S3 utilities.
    • Method Detail

      • openService

        public static com.amazonaws.services.s3.AmazonS3Client openService​(Properties prop)
        Create AmazonS3Client from properties.
        Parameters:
        prop - properties to configure @link AmazonS3Client
        Returns:
        AmazonS3Client
      • deleteBucket

        public static void deleteBucket​(String bucketName)
                                 throws IOException
        Delete S3 bucket. This method first deletes all objects from bucket and then delete empty bucket.
        Parameters:
        bucketName - the bucket name.
        Throws:
        IOException
      • 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