public class HttpUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ZIP_BUFFER_SIZE |
Constructor and Description |
---|
HttpUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addCredentials(org.apache.commons.httpclient.HttpClient client,
VariableSpace space,
String hostname,
String port,
String webAppName,
String username,
String password) |
static void |
addProxy(org.apache.commons.httpclient.HttpClient client,
VariableSpace space,
String hostname,
String proxyHostname,
String proxyPort,
String nonProxyHosts) |
static String |
constructUrl(VariableSpace space,
String hostname,
String port,
String webAppName,
String serviceAndArguments)
Returns http GET request string using specified parameters.
|
static String |
decodeBase64ZippedString(String loggingString64)
Base 64 decode, unzip and extract text using
Const.XML_ENCODING predefined charset value for byte-wise
multi-byte character handling. |
static String |
encodeBase64ZippedString(String in) |
static String |
execService(VariableSpace space,
String hostname,
String port,
String webAppName,
String serviceAndArguments,
String username,
String password,
String proxyHostname,
String proxyPort,
String nonProxyHosts) |
static String |
getPortSpecification(VariableSpace space,
String port) |
public static final int ZIP_BUFFER_SIZE
public static String execService(VariableSpace space, String hostname, String port, String webAppName, String serviceAndArguments, String username, String password, String proxyHostname, String proxyPort, String nonProxyHosts) throws Exception
Exception
public static String constructUrl(VariableSpace space, String hostname, String port, String webAppName, String serviceAndArguments) throws UnsupportedEncodingException
space
- hostname
- port
- webAppName
- serviceAndArguments
- UnsupportedEncodingException
public static String getPortSpecification(VariableSpace space, String port)
public static void addProxy(org.apache.commons.httpclient.HttpClient client, VariableSpace space, String hostname, String proxyHostname, String proxyPort, String nonProxyHosts)
public static void addCredentials(org.apache.commons.httpclient.HttpClient client, VariableSpace space, String hostname, String port, String webAppName, String username, String password)
public static String decodeBase64ZippedString(String loggingString64) throws IOException
Const.XML_ENCODING
predefined charset value for byte-wise
multi-byte character handling.loggingString64
- base64 zip archive string representationIOException
public static String encodeBase64ZippedString(String in) throws IOException
IOException