Package org.api.mtgstock.tools
Class URLUtilities
java.lang.Object
org.api.mtgstock.tools.URLUtilities
public class URLUtilities
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.log4j.Loggerlogger -
Constructor Summary
Constructors Constructor Description URLUtilities() -
Method Summary
Modifier and Type Method Description org.apache.http.HttpResponsedoGet(java.lang.String url)org.apache.http.HttpResponseexecute(org.apache.http.client.methods.HttpRequestBase req)java.lang.StringextractAndClose(org.apache.http.HttpResponse response)com.google.gson.JsonElementextractJson(java.lang.String url)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
logger
protected org.apache.log4j.Logger logger
-
-
Constructor Details
-
URLUtilities
public URLUtilities()
-
-
Method Details
-
extractAndClose
public java.lang.String extractAndClose(org.apache.http.HttpResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
execute
public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpRequestBase req) throws java.io.IOException- Throws:
java.io.IOException
-
doGet
public org.apache.http.HttpResponse doGet(java.lang.String url) throws java.io.IOException- Throws:
java.io.IOException
-
extractJson
public com.google.gson.JsonElement extractJson(java.lang.String url) throws java.io.IOException- Throws:
java.io.IOException
-