|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.framework.util.NetWorker
public class NetWorker
Performs a HTTP request using the service URL submitted to the constructor
Constructor Summary | |
---|---|
NetWorker(java.lang.String encoding,
java.net.URL url)
constructor for initializing a HTTP GET connection with a user defined encoding |
|
NetWorker(java.lang.String encoding,
java.net.URL url,
java.lang.String request)
constructor for initializing a HTTP POST connection with a user defined encoding |
|
NetWorker(java.net.URL url)
constructor for initializing a HTTP GET connection with with default character encoding |
|
NetWorker(java.net.URL url,
java.lang.String request)
constructor for initializing a HTTP POST connection with UTF-8 as character encoding |
Method Summary | |
---|---|
static boolean |
existsURL(java.net.URL url)
|
java.lang.String |
getContentType()
|
byte[] |
getDataAsByteArr(int expectedDataSize)
performs the request and returns the result as a byte array. |
java.io.InputStream |
getInputStream()
returns an InputStream from the et resource |
void |
sendRequest()
sends the request that have been passed to the constructor without expecting to receive a response. |
static java.lang.String |
url2String(java.net.URL url)
Returns the original form of a URL as as String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetWorker(java.net.URL url)
url
- URL to the net resource containing the URIpublic NetWorker(java.lang.String encoding, java.net.URL url)
encoding
- desired character encodingurl
- URL to the net resource containing the URIpublic NetWorker(java.net.URL url, java.lang.String request)
url
- URL to the net resource (without URI parameters)request
- request that shall be posted to the net resourcepublic NetWorker(java.lang.String encoding, java.net.URL url, java.lang.String request)
encoding
- desired character encodingurl
- URL to the net resource (without URI parameters)request
- request that shall be posted to the net resourceMethod Detail |
---|
public java.lang.String getContentType()
public void sendRequest() throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public byte[] getDataAsByteArr(int expectedDataSize) throws java.io.IOException
expectedDataSize
- size a the data in bytes expected to be returned from the net resource. this value
will be replaced if the resource is able to return the available data size.
java.io.IOException
public static java.lang.String url2String(java.net.URL url)
url
- URL to be converted
public static boolean existsURL(java.net.URL url)
url
-
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org