| Package | mx.utils |
| Class | public class URLUtil |
| Inheritance | URLUtil Object |
| Method | Defined by | ||
|---|---|---|---|
|
[static]
Converts a potentially relative URL to a full qualified URL.
| URLUtil | ||
|
[static]
| URLUtil | ||
|
[static]
Returns the protocol section of the specified url. | URLUtil | ||
|
[static]
| URLUtil | ||
|
[static]
Pull the domain and port information out of a URL.
| URLUtil | ||
![]() |
Indicates whether an object has a specified property defined.
| Object | |
|
[static]
| URLUtil | ||
|
[static]
Determines if the URL starts with either
http:, https:, or rtmp: followed by two slashes.
| URLUtil | ||
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter.
| Object | |
![]() |
Indicates whether the specified property exists and is enumerable.
| Object | |
|
[static]
Returns a new string with the port replaced with the specified port.
| URLUtil | ||
|
[static]
This method will replace the protocol of the
specified uri with the given protocol.
| URLUtil | ||
|
[static]
| URLUtil | ||
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
Returns the primitive value of the specified object.
| Object | |
| Constant | Defined by | ||
|---|---|---|---|
| SERVER_NAME_TOKEN : String = "{server.name}" [static]
| URLUtil | ||
| SERVER_PORT_TOKEN : String = "{server.port}" [static]
| URLUtil | ||
| getFullURL | () | method |
public static function getFullURL(rootURL:String, url:String):StringConverts a potentially relative URL to a full qualified URL. If the URL is not relative, it is just returned as is. If the URL starts with a slash, the host and port from the root URL are prepended. Otherwise, the host, port, and path are prepended.
ParametersrootURL:String — URL used to resolve url, if url is relative.
|
|
url:String — URL to convert.
|
String —
Fully qualified URL.
|
| getPort | () | method |
| getProtocol | () | method |
public static function getProtocol(url:String):String
Returns the protocol section of the specified url. Parameters
url:String — String containing the url to parse.
|
String —
String containing the protocol
or an empty string if no protocol is specified.
|
| getServerName | () | method |
| getServerNameWithPort | () | method |
public static function getServerNameWithPort(url:String):StringPull the domain and port information out of a URL.
Parametersurl:String |
String |
| isHttpsURL | () | method |
| isHttpURL | () | method |
public static function isHttpURL(url:String):BooleanDetermines if the URL starts with either http:, https:, or rtmp: followed by two slashes.
Parametersurl:String |
Boolean —
true> if the URL starts with
http:, https:, or rtmp: followed by two slashes.
|
| replacePort | () | method |
public static function replacePort(uri:String, newPort:uint):StringReturns a new string with the port replaced with the specified port. If there is no port in the specified uri the port will be inserted. This method expects that a protocol has been specified within the uri.
Parametersuri:String — String containing the uri in which the port
should be replaced.
|
|
newPort:uint — uint containing the new port to subsitute.
|
String —
String containing the uri with the port replaced.
|
| replaceProtocol | () | method |
public static function replaceProtocol(uri:String, newProtocol:String):StringThis method will replace the protocol of the specified uri with the given protocol.
Parametersuri:String — String containing the uri in which the protocol
needs to be replaced.
|
|
newProtocol:String — String containing the new protocol to use.
|
String —
String containing the uri with the protocol replaced,
or empty string if the uri doesn't contain a protocol.
|
| replaceTokens | () | method |
| SERVER_NAME_TOKEN | constant |
public static const SERVER_NAME_TOKEN:String = "{server.name}"
| SERVER_PORT_TOKEN | constant |
public static const SERVER_PORT_TOKEN:String = "{server.port}"
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/2/langref/mx/utils/URLUtil.html