org.lobobrowser.util
Class Urls
java.lang.Object
org.lobobrowser.util.Urls
public class Urls
extends java.lang.Object
static URL | createURL(URL baseUrl, String relativeUrl) - Creates an absolute URL in a manner equivalent to
major browsers.
|
static String | getCharset(URLConnection connection)
|
static Long | getExpiration(URLConnection connection, long baseTime) - Returns the time when the document should be considered expired.
|
static List | getHeaders(URLConnection connection)
|
static String | getNoRefForm(URL url)
|
static URL | guessURL(String spec)
|
static URL | guessURL(URL baseURL, String spec)
|
static boolean | hasHost(java.net.URL url)
|
static boolean | isLocal(java.net.URL url) - Whether the URL refers to a resource in the local file system.
|
static boolean | isLocalFile(java.net.URL url) - Whether the URL is a file in the local file system.
|
static boolean | sameNoRefURL(URL url1, URL url2) - Comparison that does not consider Ref.
|
PATTERN_RFC1123
public static final DateFormat PATTERN_RFC1123
createURL
public static URL createURL(URL baseUrl,
String relativeUrl)
throws java.net.MalformedURLException
Creates an absolute URL in a manner equivalent to
major browsers.
getCharset
public static String getCharset(URLConnection connection)
getExpiration
public static Long getExpiration(URLConnection connection,
long baseTime)
Returns the time when the document should be considered expired.
The time will be zero if the document always needs to be revalidated.
It will be null
if no expiration time is specified.
getHeaders
public static List getHeaders(URLConnection connection)
getNoRefForm
public static String getNoRefForm(URL url)
guessURL
public static URL guessURL(String spec)
throws MalformedURLException
guessURL
public static URL guessURL(URL baseURL,
String spec)
throws MalformedURLException
hasHost
public static boolean hasHost(java.net.URL url)
isLocal
public static boolean isLocal(java.net.URL url)
Whether the URL refers to a resource in the local file system.
isLocalFile
public static boolean isLocalFile(java.net.URL url)
Whether the URL is a file in the local file system.
sameNoRefURL
public static boolean sameNoRefURL(URL url1,
URL url2)
Comparison that does not consider Ref.