org.opensaml.ws.transport.http
Class HTTPTransportUtils

java.lang.Object
  extended by org.opensaml.ws.transport.http.HTTPTransportUtils

public class HTTPTransportUtils
extends Object

Utilities for working with HTTP transports.


Constructor Summary
protected HTTPTransportUtils()
          Constructor.
 
Method Summary
static void addNoCacheHeaders(HTTPOutTransport transport)
          Adds Cache-Control and Pragma headers meant to disable caching.
static String getRawQueryStringParameter(String queryString, String paramName)
          Get the first raw (i.e.
static void setContentType(HTTPOutTransport transport, String contentType)
          Sets the MIME content type of the transport.
static void setUTF8Encoding(HTTPOutTransport transport)
          Sets the character encoding of the transport to UTF-8.
static String urlDecode(String value)
          URL Decode the given string.
static String urlEncode(String value)
          URL Encode the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPTransportUtils

protected HTTPTransportUtils()
Constructor.

Method Detail

addNoCacheHeaders

public static void addNoCacheHeaders(HTTPOutTransport transport)
Adds Cache-Control and Pragma headers meant to disable caching.

Parameters:
transport - transport to add headers to

setUTF8Encoding

public static void setUTF8Encoding(HTTPOutTransport transport)
Sets the character encoding of the transport to UTF-8.

Parameters:
transport - transport to set character encoding type

setContentType

public static void setContentType(HTTPOutTransport transport,
                                  String contentType)
Sets the MIME content type of the transport.

Parameters:
transport - the transport to set content type on
contentType - the content type to set

urlDecode

public static String urlDecode(String value)
URL Decode the given string.

Parameters:
value - the string to decode
Returns:
the decoded string

urlEncode

public static String urlEncode(String value)
URL Encode the given string.

Parameters:
value - the string to encode
Returns:
the encoded string

getRawQueryStringParameter

public static String getRawQueryStringParameter(String queryString,
                                                String paramName)
Get the first raw (i.e. non URL-decoded) query string component with the specified parameter name. The component will be returned as a string in the form 'paramName=paramValue' (minus the quotes).

Parameters:
queryString - the raw HTTP URL query string
paramName - the name of the parameter to find
Returns:
the found component, or null if not found


Copyright © 2006-2013 Internet2. All Rights Reserved.