com.myjeeva.digitalocean
Class Utils
java.lang.Object
com.myjeeva.digitalocean.Utils
- All Implemented Interfaces:
- Constants
public final class Utils
- extends Object
- implements Constants
Utility methods for DigitalOcean API Client
- Since:
- v1.0
- Author:
- Jeevanandam M. ([email protected])
Fields inherited from interface com.myjeeva.digitalocean.Constants |
HTTPS_SCHEME, PARAM_API_KEY, PARAM_CLIENT_ID, PARAM_DATA, PARAM_IMAGE_ID, PARAM_IP_ADDRESS, PARAM_NAME, PARAM_PORT, PARAM_PRIORITY, PARAM_RECORD_TYPE, PARAM_REGION_ID, PARAM_SIDE_ID, PARAM_SSH_KEY_IDS, PARAM_SSH_PUB_KEY, PARAM_WEIGHT, STATUS, TYPE_DOMAIN_LIST, TYPE_DOMAIN_RECORD_LIST, TYPE_DROPLET_LIST, TYPE_IMAGE_LIST, TYPE_REGION_LIST, TYPE_SIZE_LIST, TYPE_SSH_KEY_LIST, UTF_8 |
Constructor Summary |
Utils()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
getGson
public static com.google.gson.Gson getGson()
byClass
public static Object byClass(com.google.gson.JsonElement jsonElement,
Class<?> clazz)
byType
public static Object byType(com.google.gson.JsonElement jsonElement,
Type type)
readInputStream
public static String readInputStream(InputStream input)
throws IOException
- Throws:
IOException
prepareDomainRecordParams
public static Map<String,String> prepareDomainRecordParams(DomainRecord domainRecord)
getResponseObject
public static com.google.gson.JsonObject getResponseObject(org.apache.http.HttpResponse response)
throws IOException
- Throws:
IOException