public class ConversionUtils extends Object
| Constructor and Description |
|---|
ConversionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getEncodingFromContentType(String contentType)
Extract the encoding (charset) from the Content-Type,
e.g.
|
static URL |
makeRelativeURL(URL baseURL,
String location)
Generate a relative URL, allowing for extraneous leading "../" segments.
|
static String |
removeSlashDotDot(String url)
collapses absolute or relative URLs containing '/..' converting
http://host/path1/..
|
public static String getEncodingFromContentType(String contentType)
contentType - public static URL makeRelativeURL(URL baseURL, String location) throws MalformedURLException
URL.URL(URL, String) constructor does not remove these.baseURL - location - relative location, possibly with extraneous leading "../"MalformedURLExceptionCopyright © 1998-2013 Apache Software Foundation. All Rights Reserved.