|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.contentmanagement.util.remotefile.protocols.url.http.HTTPCommunicator
public class HTTPCommunicator
The Class HTTPCommunicator.
| Nested Class Summary | |
|---|---|
static class |
HTTPCommunicator.HTTPHeader
The Class HTTPHeader. |
| Constructor Summary | |
|---|---|
HTTPCommunicator()
|
|
| Method Summary | |
|---|---|
static java.util.HashMap<java.lang.String,java.lang.String> |
decodeParameters(java.lang.String parameters)
parses a x-www-form-urlencoded string and returns a set f key/value pairs. |
static java.util.HashMap<java.lang.String,java.lang.String> |
extractParameters(java.lang.String urlAndParameters)
Extract parameters. |
static void |
GET(java.net.URL url,
java.io.File f)
Gets the. |
static void |
GET(java.net.URL url,
java.io.File f,
long start,
long end)
Gets the. |
static HTTPCommunicator.HTTPHeader |
getHeader(java.net.URL url)
Gets the value of field header. |
static void |
main(java.lang.String[] Args)
Test main. |
static void |
POST(java.net.URL url,
java.io.File f)
POST. |
static void |
POST(java.net.URL url,
java.io.File f,
long start,
long end)
POST. |
static boolean |
resourceExist(java.net.URL url)
Resource exist. |
static void |
retrieve(java.net.URL url,
java.io.File f)
Retrieve. |
static void |
retrieveChunk(java.net.URL url,
java.io.File f,
long start,
long end)
Retrieve chunk. |
static void |
retrieveMultithreaded(java.net.URL url,
java.io.File f,
long length)
Retrieve multithreaded. |
static void |
retrieveSingleThreaded(java.net.URL url,
java.io.File f)
Retrieve single threaded. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTTPCommunicator()
| Method Detail |
|---|
public static java.util.HashMap<java.lang.String,java.lang.String> extractParameters(java.lang.String urlAndParameters)
throws java.io.UnsupportedEncodingException
urlAndParameters - the url and parameters
java.io.UnsupportedEncodingException - the unsupported encoding exception
public static java.util.HashMap<java.lang.String,java.lang.String> decodeParameters(java.lang.String parameters)
throws java.io.UnsupportedEncodingException
parameters - the parameters
java.io.UnsupportedEncodingException - the unsupported encoding exceptionpublic static boolean resourceExist(java.net.URL url)
url - the url
public static HTTPCommunicator.HTTPHeader getHeader(java.net.URL url)
throws java.io.IOException
url - the url
java.io.IOException - Signals that an I/O exception has occurred.
public static void retrieve(java.net.URL url,
java.io.File f)
throws java.io.IOException
url - the urlf - the f
java.io.IOException - Signals that an I/O exception has occurred.
public static void retrieveSingleThreaded(java.net.URL url,
java.io.File f)
throws java.io.IOException
url - the urlf - the f
java.io.IOException - Signals that an I/O exception has occurred.
public static void retrieveMultithreaded(java.net.URL url,
java.io.File f,
long length)
throws java.io.IOException
url - the urlf - the flength - the length
java.io.IOException - Signals that an I/O exception has occurred.
public static void retrieveChunk(java.net.URL url,
java.io.File f,
long start,
long end)
throws java.io.IOException
url - the urlf - the fstart - the startend - the end
java.io.IOException - Signals that an I/O exception has occurred.
public static void GET(java.net.URL url,
java.io.File f)
throws java.io.IOException
url - the urlf - the f
java.io.IOException - Signals that an I/O exception has occurred.
public static void GET(java.net.URL url,
java.io.File f,
long start,
long end)
throws java.io.IOException
url - the urlf - the fstart - the startend - the end
java.io.IOException - Signals that an I/O exception has occurred.
public static void POST(java.net.URL url,
java.io.File f)
throws java.io.IOException
url - the urlf - the f
java.io.IOException - Signals that an I/O exception has occurred.
public static void POST(java.net.URL url,
java.io.File f,
long start,
long end)
throws java.io.IOException
url - the urlf - the fstart - the startend - the end
java.io.IOException - Signals that an I/O exception has occurred.
public static void main(java.lang.String[] Args)
throws java.lang.Exception
Args - the args
java.lang.Exception - the exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||