Apache CXF API

org.apache.cxf.transport.http.netty.server.util
Class Utils

java.lang.Object
  extended by org.apache.cxf.transport.http.netty.server.util.Utils

public final class Utils
extends Object


Method Summary
static
<T> Enumeration<T>
emptyEnumeration()
           
static
<T> Enumeration<T>
enumeration(Collection<T> collection)
           
static
<T> Enumeration<T>
enumerationFromKeys(Map<T,?> map)
           
static
<T> Enumeration<T>
enumerationFromValues(Map<?,T> map)
           
static String getCharsetFromContentType(String contentType)
          Parse the character encoding from the specified content type header.
static Collection<io.netty.handler.codec.http.Cookie> getCookies(String name, io.netty.handler.codec.http.HttpRequest request)
           
static Collection<io.netty.handler.codec.http.Cookie> getCookies(String name, io.netty.handler.codec.http.HttpResponse response)
           
static String getMimeType(String fileUrl)
           
static Collection<Locale> parseAcceptLanguageHeader(String acceptLanguageHeader)
           
static String sanitizeUri(String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

emptyEnumeration

public static <T> Enumeration<T> emptyEnumeration()

enumeration

public static <T> Enumeration<T> enumeration(Collection<T> collection)

enumerationFromKeys

public static <T> Enumeration<T> enumerationFromKeys(Map<T,?> map)

enumerationFromValues

public static <T> Enumeration<T> enumerationFromValues(Map<?,T> map)

getCharsetFromContentType

public static String getCharsetFromContentType(String contentType)
Parse the character encoding from the specified content type header. If the content type is null, or there is no explicit character encoding, null is returned.

Parameters:
contentType - a content type header

getCookies

public static Collection<io.netty.handler.codec.http.Cookie> getCookies(String name,
                                                                        io.netty.handler.codec.http.HttpRequest request)

getCookies

public static Collection<io.netty.handler.codec.http.Cookie> getCookies(String name,
                                                                        io.netty.handler.codec.http.HttpResponse response)

getMimeType

public static String getMimeType(String fileUrl)

sanitizeUri

public static String sanitizeUri(String uri)

parseAcceptLanguageHeader

public static Collection<Locale> parseAcceptLanguageHeader(String acceptLanguageHeader)

Apache CXF API

Apache CXF