T
- The type of the connection return.public abstract class Connection<T>
extends java.lang.Object
implements java.util.concurrent.Callable<T>
Modifier | Constructor and Description |
---|---|
protected |
Connection(java.lang.String url) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
get()
Performs an URL connection using HTTP GET.
|
protected byte[] |
get(java.util.Map<java.lang.String,java.lang.String> headers)
Performs an URL connection using HTTP GET.
|
protected java.lang.String |
getUrl() |
protected byte[] |
post(java.util.Map<java.lang.String,java.lang.String> headers,
byte[] data)
Performs an URL connection using HTTP POST.
|
protected java.lang.String getUrl()
protected byte[] get() throws java.io.IOException
java.io.IOException
- In case an IO error happens.protected byte[] get(java.util.Map<java.lang.String,java.lang.String> headers) throws java.io.IOException
headers
- The headers of the connection.java.io.IOException
- n case an IO error happens.protected byte[] post(java.util.Map<java.lang.String,java.lang.String> headers, byte[] data) throws java.io.IOException
java.io.IOException
- In case an IO error happens.