📄 biuri.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--
Generated using api.website.xsl version 2003-07-17
-->
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BiUri</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript">
function showDerivedClasses() {
var ul = document.getElementById("api-derived-classes");
var lis = ul.childNodes;
var l = lis.length;
for (var i = 1; i < l; i++)
lis[i].style.display = "";
lis[0].style.display = "none";
}
</script></head>
<body>
<h1 id="BiUri">BiUri</h1>
<p>
This class is used to define a Universal Resource Identifier (URI). This
is sometimes also known as a Uniform Resource Locator (URL). A URI is
used to describe the location and source of external files. A URI is
only a representaion of the string format describing the URI. It does
not know how to lookup the information the URI might point at.<br>
<br>
A general URI has the following format. Below this is a list of what
part of the URI maps to what property.<br>
<br>
<code>http://user:password@www.domain.com:80/dir/file.html?param0=value=0;param1=value1#fragment</code><br>
<br>
<code><a href="#scheme">scheme</a></code> - http<br>
<code><a href="#userInfo">userInfo</a></code> - user:password<br>
<code><a href="#host">host</a></code> - www.domain.com<br>
<code><a href="#port">port</a></code> - 80<br>
<code><a href="#path">path</a></code> - /dir/file.html<br>
<code><a href="#dirPath">dirPath</a></code> - /dir/<br>
<code><a href="#query">query</a></code> - ?param0=value=0;param1=value1
<code><a href="#fragment">fragment</a></code> - #fragment<br>
<code><a href="#getParam">getParam</a></code>("param0") - value0<br>
<code><a href="#getParam">getParam</a></code>("param1") - value1<br>
<code><a href="#href">href</a></code> - http://user:password@www.domain.com:80/dir/file.html?param0=value=0;param1=value1#fragment<br>
</p>
<p>This class extends
<code><a href="BiObject.html">BiObject</a></code>
and therefore all methods and fields available for
<code><a href="BiObject.html">BiObject</a></code>
are also available for <code>BiUri</code>.</p>
<ul class="partial-class-tree">
<li><code><a href="BiObject.html">BiObject</a></code><ul>
<li><code>BiUri</code><ul id="api-derived-classes"></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiUri([<span class="methodArgument">sBase</span> [, <span class="methodArgument">sRel</span>]])</code></p>
<h3>Parameters</h3>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>sBase</code></td>
<td><code class="type">String/<code><a href="BiUri.html">BiUri</a></code></code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>The base URI</td>
</tr>
<tr>
<td><code>sRel</code></td>
<td><code class="type">String/<code><a href="BiUri.html">BiUri</a></code></code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
The URI relative to the base URI. If this describes an absolute
URI then the base URI will be replaced.
</td>
</tr>
</tbody>
</table>
<h2>Properties</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="get-header">get</td>
<td class="set-header">set</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><a name="dirPath"></a><code>dirPath</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is the part of the URI discribing the directory and it
does not include the file name. This ends with a '/' if the
path is available.
</td>
</tr>
<tr>
<td><a name="fragment"></a><code>fragment</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is all the text comming after (and including) the first '#'
character.
</td>
</tr>
<tr>
<td><a name="host"></a><code>host</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
The name of the host (or domain) that the URI points at. For a
mailto URI this is the part after the '@'.
</td>
</tr>
<tr>
<td><a name="href"></a><code>href</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"><img src="check.png" alt="checked"></td>
<td>
This is the complete string representation of the URI.
</td>
</tr>
<tr>
<td><a name="path"></a><code>path</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is the part of the URI that comes after the port. It includes
the file part of URI if available.
</td>
</tr>
<tr>
<td><a name="port"></a><code>port</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is the port part of the URI.
</td>
</tr>
<tr>
<td><a name="query"></a><code>query</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is all the text comming after (and including) the first '?'
character. If the URI has a fragment the fragment is not included
in the query.
</td>
</tr>
<tr>
<td><a name="scheme"></a><code>scheme</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
The scheme is the first part of the URI and is the text before
the first ':'. For example "http", "mailto" and "file" are
common schemes.
</td>
</tr>
<tr>
<td><a name="userInfo"></a><code>userInfo</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is the part of the URI used to describe the user information.
This is the part coming after the scheme but before the domain.
This is empty when no user information is available.
</td>
</tr>
</tbody>
</table>
<h2>Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#getParam">getParam</a></code></td>
<td>
Gets the value for a param
</td>
</tr>
<tr>
<td><code><a href="#removeParam">removeParam</a></code></td>
<td>
Removes a param based on the param name
</td>
</tr>
<tr>
<td><code><a href="#setParam">setParam</a></code></td>
<td>
Sets the value for a param
</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<p>None.</p>
<h2>Static Methods</h2>
<p>None.</p>
<h2>Static Fields</h2>
<p>None.</p>
<h2>Remarks</h2>
<p>
</p>
<h2>Method Details</h2>
<h3><a name="getParam"></a>getParam</h3>
<p>
Gets the value for a param
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getParam(<span class="methodArgument">sName</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>sName</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>The name of the param</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="removeParam"></a>removeParam</h3>
<p>
Removes a param based on the param name
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.removeParam(<span class="methodArgument">sName</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>sName</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>The name of the param to remove</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="setParam"></a>setParam</h3>
<p>
Sets the value for a param
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.setParam(<span class="methodArgument">sName</span>, <span class="methodArgument">sValue</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>sName</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>The name of the param</td>
</tr>
<tr>
<td><code>sValue</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>The value of the param</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -