|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.HTTP_ServerUtility
This class contains a set of static functions used by UDP_HTTP_ServerAdapter and HTTP_Server for server transactions. These functions translate a message from bytes into a string of hexadecimal characters ('0'-'9' or 'A'-'F'), insert that string into a CGI query, read the response, translate the response back into a byte[] and return it.
Field Summary | |
static int |
MAX_SERVER_RESPONSE_SIZE
Maximum size of a response coming from the server. |
Constructor Summary | |
HTTP_ServerUtility()
|
Method Summary | |
static java.lang.String |
decodeURLString(java.lang.String s)
This method takes a string from a URL (e.g. |
static java.lang.String |
encodeURLString(java.lang.String s)
This function encodes a string in a URL format. |
static java.lang.String |
query(java.lang.String urlString)
Builds a simple query without a message and return the response as a string. |
static byte[] |
query(java.lang.String server_query_prefix,
java.lang.String overlayID,
byte[] input_message)
Builds a query with a message and return the response as another message. |
static byte[] |
toByteArray(java.lang.String s)
This is the inverse function of toHexString(). |
static java.lang.String |
toHexString(byte[] a)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_SERVER_RESPONSE_SIZE
Constructor Detail |
public HTTP_ServerUtility()
Method Detail |
public static java.lang.String query(java.lang.String urlString) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException
public static byte[] query(java.lang.String server_query_prefix, java.lang.String overlayID, byte[] input_message) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException
public static java.lang.String toHexString(byte[] a)
public static byte[] toByteArray(java.lang.String s)
public static java.lang.String decodeURLString(java.lang.String s)
public static java.lang.String encodeURLString(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |