< prev index next >

src/java.base/share/classes/java/net/URI.java

Print this page

        

*** 130,156 **** * relative. The path of a hierarchical URI that is either absolute or * specifies an authority is always absolute. * * <p> All told, then, a URI instance has the following nine components: * ! * <blockquote><table class="borderless"> * <caption style="display:none">Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment</caption> * <thead> ! * <tr><th><i>Component</i></th><th><i>Type</i></th></tr> * </thead> ! * <tbody> ! * <tr><td>scheme</td><td>{@code String}</td></tr> ! * <tr><td>scheme-specific-part&nbsp;&nbsp;&nbsp;&nbsp;</td><td>{@code String}</td></tr> ! * <tr><td>authority</td><td>{@code String}</td></tr> ! * <tr><td>user-info</td><td>{@code String}</td></tr> ! * <tr><td>host</td><td>{@code String}</td></tr> ! * <tr><td>port</td><td>{@code int}</td></tr> ! * <tr><td>path</td><td>{@code String}</td></tr> ! * <tr><td>query</td><td>{@code String}</td></tr> ! * <tr><td>fragment</td><td>{@code String}</td></tr> * </tbody> ! * </table></blockquote> * * In a given instance any particular component is either <i>undefined</i> or * <i>defined</i> with a distinct value. Undefined string components are * represented by {@code null}, while undefined integer components are * represented by {@code -1}. A string component may be defined to have the --- 130,156 ---- * relative. The path of a hierarchical URI that is either absolute or * specifies an authority is always absolute. * * <p> All told, then, a URI instance has the following nine components: * ! * <table class="striped" style="margin-left:2em"> * <caption style="display:none">Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment</caption> * <thead> ! * <tr><th scope="col">Component</th><th scope="col">Type</th></tr> * </thead> ! * <tbody style="text-align:left"> ! * <tr><th scope="row">scheme</th><td>{@code String}</td></tr> ! * <tr><th scope="row">scheme-specific-part</th><td>{@code String}</td></tr> ! * <tr><th scope="row">authority</th><td>{@code String}</td></tr> ! * <tr><th scope="row">user-info</th><td>{@code String}</td></tr> ! * <tr><th scope="row">host</th><td>{@code String}</td></tr> ! * <tr><th scope="row">port</th><td>{@code int}</td></tr> ! * <tr><th scope="row">path</th><td>{@code String}</td></tr> ! * <tr><th scope="row">query</th><td>{@code String}</td></tr> ! * <tr><th scope="row">fragment</th><td>{@code String}</td></tr> * </tbody> ! * </table> * * In a given instance any particular component is either <i>undefined</i> or * <i>defined</i> with a distinct value. Undefined string components are * represented by {@code null}, while undefined integer components are * represented by {@code -1}. A string component may be defined to have the
*** 251,295 **** * RFC&nbsp;2396 specifies precisely which characters are permitted in the * various components of a URI reference. The following categories, most of * which are taken from that specification, are used below to describe these * constraints: * ! * <blockquote><table class="borderless"> * <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption> ! * <tbody> ! * <tr><th style="vertical-align:top"><i>alpha</i></th> * <td>The US-ASCII alphabetic characters, * {@code 'A'}&nbsp;through&nbsp;{@code 'Z'} * and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr> ! * <tr><th style="vertical-align:top"><i>digit</i></th> * <td>The US-ASCII decimal digit characters, * {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr> ! * <tr><th style="vertical-align:top"><i>alphanum</i></th> * <td>All <i>alpha</i> and <i>digit</i> characters</td></tr> ! * <tr><th style="vertical-align:top"><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th> * <td>All <i>alphanum</i> characters together with those in the string * {@code "_-!.~'()*"}</td></tr> ! * <tr><th style="vertical-align:top"><i>punct</i></th> * <td>The characters in the string {@code ",;:$&+="}</td></tr> ! * <tr><th style="vertical-align:top"><i>reserved</i></th> * <td>All <i>punct</i> characters together with those in the string * {@code "?/[]@"}</td></tr> ! * <tr><th style="vertical-align:top"><i>escaped</i></th> * <td>Escaped octets, that is, triplets consisting of the percent * character ({@code '%'}) followed by two hexadecimal digits * ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and * {@code 'a'}-{@code 'f'})</td></tr> ! * <tr><th style="vertical-align:top"><i>other</i></th> * <td>The Unicode characters that are not in the US-ASCII character set, * are not control characters (according to the {@link * java.lang.Character#isISOControl(char) Character.isISOControl} * method), and are not space characters (according to the {@link * java.lang.Character#isSpaceChar(char) Character.isSpaceChar} * method)&nbsp;&nbsp;<i>(<b>Deviation from RFC 2396</b>, which is * limited to US-ASCII)</i></td></tr> * </tbody> ! * </table></blockquote> * * <p><a id="legal-chars"></a> The set of all legal URI characters consists of * the <i>unreserved</i>, <i>reserved</i>, <i>escaped</i>, and <i>other</i> * characters. * --- 251,298 ---- * RFC&nbsp;2396 specifies precisely which characters are permitted in the * various components of a URI reference. The following categories, most of * which are taken from that specification, are used below to describe these * constraints: * ! * <table class="striped" style="margin-left:2em"> * <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption> ! * <thead> ! * <tr><th scope="col">Category</th><th scope="col">Description</th></tr> ! * </thead> ! * <tbody style="text-align:left"> ! * <tr><th scope="row" style="vertical-align:top">alpha</th> * <td>The US-ASCII alphabetic characters, * {@code 'A'}&nbsp;through&nbsp;{@code 'Z'} * and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr> ! * <tr><th scope="row" style="vertical-align:top">digit</th> * <td>The US-ASCII decimal digit characters, * {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr> ! * <tr><th scope="row" style="vertical-align:top">alphanum</th> * <td>All <i>alpha</i> and <i>digit</i> characters</td></tr> ! * <tr><th scope="row" style="vertical-align:top">unreserved</th> * <td>All <i>alphanum</i> characters together with those in the string * {@code "_-!.~'()*"}</td></tr> ! * <tr><th scope="row" style="vertical-align:top">punct</th> * <td>The characters in the string {@code ",;:$&+="}</td></tr> ! * <tr><th scope="row" style="vertical-align:top">reserved</th> * <td>All <i>punct</i> characters together with those in the string * {@code "?/[]@"}</td></tr> ! * <tr><th scope="row" style="vertical-align:top">escaped</th> * <td>Escaped octets, that is, triplets consisting of the percent * character ({@code '%'}) followed by two hexadecimal digits * ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and * {@code 'a'}-{@code 'f'})</td></tr> ! * <tr><th scope="row" style="vertical-align:top">other</th> * <td>The Unicode characters that are not in the US-ASCII character set, * are not control characters (according to the {@link * java.lang.Character#isISOControl(char) Character.isISOControl} * method), and are not space characters (according to the {@link * java.lang.Character#isSpaceChar(char) Character.isSpaceChar} * method)&nbsp;&nbsp;<i>(<b>Deviation from RFC 2396</b>, which is * limited to US-ASCII)</i></td></tr> * </tbody> ! * </table> * * <p><a id="legal-chars"></a> The set of all legal URI characters consists of * the <i>unreserved</i>, <i>reserved</i>, <i>escaped</i>, and <i>other</i> * characters. *
< prev index next >