com.elastisys.scale.cloudpool.aws.commons.client.AmazonApiUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudpool.aws.commons Show documentation
Show all versions of cloudpool.aws.commons Show documentation
Common utility classes for building Amazon AWS-based cloud pools.
package com.elastisys.scale.cloudpool.aws.commons.client;
import org.apache.commons.codec.binary.Base64;
/**
* Commonly applicable convenience methods for working against the Amazon AWS
* client APIs.
*
*
*/
public class AmazonApiUtils {
private AmazonApiUtils() {
throw new IllegalStateException("Not instantiable.");
}
/**
* Encode a string in base
* 64.
*
* @param input
* The input string.
* @return The input string encoded in base 64.
*/
public static String base64Encode(String input) {
return new String(Base64.encodeBase64(input.getBytes()));
}
}