Package org.loboevolution.common
Class Urls
java.lang.Object
org.loboevolution.common.Urls
Urls class.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic URI
createURI.static String
Converts the given URL into a valid URL by encoding illegal characters.static boolean
static String
getCharset
(URLConnection connection) getCharset.static Long
getExpiration
(URLConnection connection, long baseTime) getExpiration.static boolean
isAbsolute
(String url) isAbsolute.static boolean
isLocalFile
(URL url) isLocalFile.
-
Field Details
-
PATTERN_RFC1123
The Constant PATTERN_RFC1123.
-
-
Constructor Details
-
Urls
public Urls()
-
-
Method Details
-
createURI
createURI.
-
encodeIllegalCharacters
Converts the given URL into a valid URL by encoding illegal characters. Right now it is implemented like in IE7: only spaces are replaced with "%20". (Firefox 3 also encodes other non-ASCII and some ASCII characters).- Parameters:
url
- aString
object.- Returns:
- the encoded URL
-
getCharset
getCharset.
- Parameters:
connection
- aURLConnection
object.- Returns:
- a
String
object.
-
isAbsolute
isAbsolute.
- Parameters:
url
- aString
object.- Returns:
- a boolean.
-
isLocalFile
isLocalFile.
- Parameters:
url
- aURL
object.- Returns:
- a boolean.
-
getExpiration
getExpiration.
- Parameters:
connection
- aURLConnection
object.baseTime
- a long.- Returns:
- a
Long
object.
-
exists
-