Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


oracle.stellent.wcm.common.http
Class HttpUtils

java.lang.Object
  extended by oracle.stellent.wcm.common.http.HttpUtils


public abstract class HttpUtils
extends java.lang.Object

Class for holding utility methods for working with HTTP


Constructor Summary
HttpUtils()
           

 

Method Summary
static java.util.Map<java.lang.String,java.lang.String> createParametersFromQuery(java.lang.String queryString)
          Build a map of query name to value from a HTTP query string
static java.lang.String createQueryFromParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
          Create the query string from the parameters.
static java.lang.String getFileFromDispositionHeader(java.lang.String contentDisposition)
          Retrieve the file name from the Content-Disposition header.
static java.lang.String getPathFromUrl(java.lang.String url)
          Retrieve the path from the url
static java.lang.String getQueryFromUrl(java.lang.String url)
          Retrieve the query from the url

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

HttpUtils

public HttpUtils()

Method Detail

getPathFromUrl

public static java.lang.String getPathFromUrl(java.lang.String url)
Retrieve the path from the url
Parameters:
url - the url (in the format /some/path?query)
Returns:
the path portion

getQueryFromUrl

public static java.lang.String getQueryFromUrl(java.lang.String url)
Retrieve the query from the url
Parameters:
url - the url (in the format /some/path?query)
Returns:
the query portion

createParametersFromQuery

public static java.util.Map<java.lang.String,java.lang.String> createParametersFromQuery(java.lang.String queryString)
Build a map of query name to value from a HTTP query string
Parameters:
queryString - a URL-encoded query string (param=value&param2=value2)
Returns:
a mapping of param name to value

createQueryFromParameters

public static java.lang.String createQueryFromParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Create the query string from the parameters.
Parameters:
parameters - a name/value pair mapping of HTTP parameters
Returns:
a URL-encoded string, does not include the beginning "?" character

getFileFromDispositionHeader

public static java.lang.String getFileFromDispositionHeader(java.lang.String contentDisposition)
Retrieve the file name from the Content-Disposition header. Header is usually of the format: Content-Disposition: inline; filename="file_txt"
Parameters:
contentDisposition - the content disposition header
Returns:
the file name or null if not found

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.