org.lobobrowser.util
public class Urls extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.text.DateFormat |
PATTERN_RFC1123 |
Modifier and Type | Method and Description |
---|---|
static java.net.URL |
createURL(java.net.URL baseUrl,
java.lang.String relativeUrl)
Creates an absolute URL in a manner equivalent to
major browsers.
|
static java.lang.String |
getCharset(java.net.URLConnection connection) |
static java.lang.Long |
getExpiration(java.net.URLConnection connection,
long baseTime)
Returns the time when the document should be considered expired.
|
static java.util.List |
getHeaders(java.net.URLConnection connection) |
static java.lang.String |
getNoRefForm(java.net.URL url) |
static java.net.URL |
guessURL(java.lang.String spec) |
static java.net.URL |
guessURL(java.net.URL baseURL,
java.lang.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(java.net.URL url1,
java.net.URL url2)
Comparison that does not consider Ref.
|
public static boolean isLocal(java.net.URL url)
public static boolean isLocalFile(java.net.URL url)
public static boolean hasHost(java.net.URL url)
public static java.net.URL createURL(java.net.URL baseUrl, java.lang.String relativeUrl) throws java.net.MalformedURLException
java.net.MalformedURLException
public static java.lang.Long getExpiration(java.net.URLConnection connection, long baseTime)
null
if no expiration time is specified.public static java.util.List getHeaders(java.net.URLConnection connection)
public static java.net.URL guessURL(java.net.URL baseURL, java.lang.String spec) throws java.net.MalformedURLException
java.net.MalformedURLException
public static java.net.URL guessURL(java.lang.String spec) throws java.net.MalformedURLException
java.net.MalformedURLException
public static java.lang.String getCharset(java.net.URLConnection connection)
public static java.lang.String getNoRefForm(java.net.URL url)
public static boolean sameNoRefURL(java.net.URL url1, java.net.URL url2)
url1
- url2
-