DigitalOcean API Client in Java

com.myjeeva.digitalocean
Class Utils

java.lang.Object
  extended by 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])

Field Summary
 
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()
           
 
Method Summary
static Object byClass(com.google.gson.JsonElement jsonElement, Class<?> clazz)
           
static Object byType(com.google.gson.JsonElement jsonElement, Type type)
           
static com.google.gson.Gson getGson()
           
static com.google.gson.JsonObject getResponseObject(org.apache.http.HttpResponse response)
           
static Map<String,String> prepareDomainRecordParams(DomainRecord domainRecord)
           
static String readInputStream(InputStream input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

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

DigitalOcean API Client in Java

Copyright © 2014 myjeeva blog, All rights reserved.

The copyright of the pages and contents on this website is with myjeeva.com and the content is licensed under Creative Commons Attribution-Share Alike 3.0 Unported License. Libraries and code snippets on myjeeva blog has license information.