public final class HttpUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
convertHeaderValuesToString(Map<String,List<Object>> headers,
boolean delegateOnly) |
static String |
encodePartiallyEncoded(String encoded,
boolean query)
Encodes partially encoded string.
|
static String |
fromPathSegment(javax.ws.rs.core.PathSegment ps) |
static String |
getBaseAddress(Message m) |
static int |
getContentLength(String value) |
static String |
getEncoding(javax.ws.rs.core.MediaType mt,
String defaultEncoding) |
static String |
getEndpointAddress(Message m) |
static javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<Object> |
getHeaderDelegate(Object o) |
static javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<Object> |
getHeaderDelegate(javax.ws.rs.ext.RuntimeDelegate rd,
Object o) |
static String |
getHeaderString(List<String> values) |
static Date |
getHttpDate(String value) |
static SimpleDateFormat |
getHttpDateFormat() |
static Locale |
getLocale(String value) |
static javax.ws.rs.core.MultivaluedMap<String,Object> |
getModifiableHeaders(Message m) |
static <T> javax.ws.rs.core.MultivaluedMap<String,T> |
getModifiableStringHeaders(Message m) |
static String |
getOriginalAddress(Message m) |
static javax.ws.rs.ext.RuntimeDelegate |
getOtherRuntimeDelegate() |
static javax.ws.rs.core.Response.Status |
getParameterFailureStatus(ParameterType pType) |
static String |
getPathToMatch(Message m,
boolean addSlash) |
static String |
getPathToMatch(String path,
String address,
boolean addSlash) |
static String |
getProtocolHeader(Message m,
String name,
String defaultValue) |
static String |
getProtocolHeader(Message m,
String name,
String defaultValue,
boolean setOnMessage) |
static String |
getSetEncoding(javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
String defaultEncoding) |
static boolean |
isDateRelatedHeader(String headerName) |
static boolean |
isHttpRequest(Message message) |
static boolean |
isPartiallyEncoded(String value) |
static String |
pathDecode(String value) |
static String |
pathEncode(String value) |
static String |
queryEncode(String value) |
static URI |
relativize(URI base,
URI uri) |
static void |
resetRequestURI(Message m,
String requestURI) |
static URI |
resolve(javax.ws.rs.core.UriBuilder baseBuilder,
URI uri) |
static URI |
toAbsoluteUri(String relativePath,
Message message) |
static URI |
toAbsoluteUri(URI u,
Message message) |
static String |
toHttpDate(Date date) |
static String |
toHttpLanguage(Locale locale) |
static void |
updatePath(Message m,
String path) |
static String |
urlDecode(String value) |
static String |
urlDecode(String value,
String enc) |
static String |
urlEncode(String value) |
static String |
urlEncode(String value,
String enc) |
public static boolean isPartiallyEncoded(String value)
public static String encodePartiallyEncoded(String encoded, boolean query)
encoded
- fully or partially encoded string.public static SimpleDateFormat getHttpDateFormat()
public static javax.ws.rs.ext.RuntimeDelegate getOtherRuntimeDelegate()
public static javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<Object> getHeaderDelegate(Object o)
public static javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<Object> getHeaderDelegate(javax.ws.rs.ext.RuntimeDelegate rd, Object o)
public static <T> javax.ws.rs.core.MultivaluedMap<String,T> getModifiableStringHeaders(Message m)
public static javax.ws.rs.core.MultivaluedMap<String,Object> getModifiableHeaders(Message m)
public static void convertHeaderValuesToString(Map<String,List<Object>> headers, boolean delegateOnly)
public static int getContentLength(String value)
public static boolean isDateRelatedHeader(String headerName)
public static boolean isHttpRequest(Message message)
public static String getProtocolHeader(Message m, String name, String defaultValue)
public static String getProtocolHeader(Message m, String name, String defaultValue, boolean setOnMessage)
public static String fromPathSegment(javax.ws.rs.core.PathSegment ps)
public static javax.ws.rs.core.Response.Status getParameterFailureStatus(ParameterType pType)
public static String getSetEncoding(javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, String defaultEncoding)
Apache CXF