org.jets3t.samples
Class SamplesUtils

java.lang.Object
  extended by org.jets3t.samples.SamplesUtils

public class SamplesUtils
extends java.lang.Object

Utilities used by all Sample code, collected in one place for convenience.


Field Summary
static java.lang.String AWS_ACCESS_KEY_PROPERTY_NAME
           
static java.lang.String AWS_SECRET_KEY_PROPERTY_NAME
           
static java.lang.String GS_ACCESS_KEY_PROPERTY_NAME
           
static java.lang.String GS_SECRET_KEY_PROPERTY_NAME
           
static java.lang.String SAMPLES_PROPERTIES_NAME
           
 
Constructor Summary
SamplesUtils()
           
 
Method Summary
static AWSCredentials loadAWSCredentials()
          Loads AWS Credentials from the file samples.properties (SAMPLES_PROPERTIES_NAME) that must be available in the classpath, and must contain settings awsAccessKey and awsSecretKey.
static GSCredentials loadGSCredentials()
          Loads Google Storage Credentials from the file samples.properties (SAMPLES_PROPERTIES_NAME) that must be available in the classpath, and must contain settings gsAccessKey and gsSecretKey.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAMPLES_PROPERTIES_NAME

public static final java.lang.String SAMPLES_PROPERTIES_NAME
See Also:
Constant Field Values

AWS_ACCESS_KEY_PROPERTY_NAME

public static final java.lang.String AWS_ACCESS_KEY_PROPERTY_NAME
See Also:
Constant Field Values

AWS_SECRET_KEY_PROPERTY_NAME

public static final java.lang.String AWS_SECRET_KEY_PROPERTY_NAME
See Also:
Constant Field Values

GS_ACCESS_KEY_PROPERTY_NAME

public static final java.lang.String GS_ACCESS_KEY_PROPERTY_NAME
See Also:
Constant Field Values

GS_SECRET_KEY_PROPERTY_NAME

public static final java.lang.String GS_SECRET_KEY_PROPERTY_NAME
See Also:
Constant Field Values
Constructor Detail

SamplesUtils

public SamplesUtils()
Method Detail

loadAWSCredentials

public static AWSCredentials loadAWSCredentials()
                                         throws java.io.IOException
Loads AWS Credentials from the file samples.properties (SAMPLES_PROPERTIES_NAME) that must be available in the classpath, and must contain settings awsAccessKey and awsSecretKey.

Returns:
the AWS credentials loaded from the samples properties file.
Throws:
java.io.IOException

loadGSCredentials

public static GSCredentials loadGSCredentials()
                                       throws java.io.IOException
Loads Google Storage Credentials from the file samples.properties (SAMPLES_PROPERTIES_NAME) that must be available in the classpath, and must contain settings gsAccessKey and gsSecretKey.

Returns:
the Google Storage credentials loaded from the samples properties file.
Throws:
java.io.IOException