URLUtil
public
final
class
URLUtil
extends Object
Summary
Inherited methods |
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public constructors
Public methods
composeSearchUrl
String composeSearchUrl (String inQuery,
String template,
String queryPlaceHolder)
Parameters |
inQuery |
String
|
template |
String
|
queryPlaceHolder |
String
|
decode
byte[] decode (byte[] url)
guessFileName
String guessFileName (String url,
String contentDisposition,
String mimeType)
Guesses canonical filename that a download would have, using
the URL and contentDisposition. File extension, if not defined,
is added based on the mimetype
Parameters |
url |
String :
Url to the content |
contentDisposition |
String :
Content-Disposition HTTP header or null |
mimeType |
String :
Mime-type of the content or null |
Returns |
String |
suggested filename
|
guessUrl
String guessUrl (String inUrl)
Cleans up (if possible) user-entered web addresses
isAboutUrl
boolean isAboutUrl (String url)
Returns |
boolean |
True iff the url is an about: url.
|
isAssetUrl
boolean isAssetUrl (String url)
Returns |
boolean |
True iff the url is an asset file.
|
isContentUrl
boolean isContentUrl (String url)
Returns |
boolean |
True iff the url is a content: url.
|
isCookielessProxyUrl
boolean isCookielessProxyUrl (String url)
This method was deprecated
in API level 3.
Cookieless proxy is no longer supported.
Returns |
boolean |
True iff the url is a proxy url to allow cookieless network
requests from a file url. |
isDataUrl
boolean isDataUrl (String url)
Returns |
boolean |
True iff the url is a data: url.
|
isFileUrl
boolean isFileUrl (String url)
Returns |
boolean |
True iff the url is a local file.
|
isHttpUrl
boolean isHttpUrl (String url)
Returns |
boolean |
True iff the url is an http: url.
|
isHttpsUrl
boolean isHttpsUrl (String url)
Returns |
boolean |
True iff the url is an https: url.
|
isJavaScriptUrl
boolean isJavaScriptUrl (String url)
Returns |
boolean |
True iff the url is a javascript: url.
|
isNetworkUrl
boolean isNetworkUrl (String url)
Returns |
boolean |
True iff the url is a network url.
|
isValidUrl
boolean isValidUrl (String url)
Returns |
boolean |
True iff the url is valid.
|
stripAnchor
String stripAnchor (String url)
Strips the url of the anchor.