src/java.base/share/classes/java/net/URL.java
changeset 52700 b206bdfb9fe2
parent 52694 93afbb11063b
child 52944 d75110673dc9
equal deleted inserted replaced
52699:44fe5fab538a 52700:b206bdfb9fe2
    93  * <p>
    93  * <p>
    94  * A URL may have appended to it a "fragment", also known
    94  * A URL may have appended to it a "fragment", also known
    95  * as a "ref" or a "reference". The fragment is indicated by the sharp
    95  * as a "ref" or a "reference". The fragment is indicated by the sharp
    96  * sign character "#" followed by more characters. For example,
    96  * sign character "#" followed by more characters. For example,
    97  * <blockquote><pre>
    97  * <blockquote><pre>
    98  *     http://java.sun.com/index.html#chapter1
    98  *     http://www.example.com/index.html#chapter1
    99  * </pre></blockquote>
    99  * </pre></blockquote>
   100  * <p>
   100  * <p>
   101  * This fragment is not technically part of the URL. Rather, it
   101  * This fragment is not technically part of the URL. Rather, it
   102  * indicates that after the specified resource is retrieved, the
   102  * indicates that after the specified resource is retrieved, the
   103  * application is specifically interested in that part of the
   103  * application is specifically interested in that part of the
   107  * An application can also specify a "relative URL",
   107  * An application can also specify a "relative URL",
   108  * which contains only enough information to reach the resource
   108  * which contains only enough information to reach the resource
   109  * relative to another URL. Relative URLs are frequently used within
   109  * relative to another URL. Relative URLs are frequently used within
   110  * HTML pages. For example, if the contents of the URL:
   110  * HTML pages. For example, if the contents of the URL:
   111  * <blockquote><pre>
   111  * <blockquote><pre>
   112  *     http://java.sun.com/index.html
   112  *     http://www.example.com/index.html
   113  * </pre></blockquote>
   113  * </pre></blockquote>
   114  * contained within it the relative URL:
   114  * contained within it the relative URL:
   115  * <blockquote><pre>
   115  * <blockquote><pre>
   116  *     FAQ.html
   116  *     FAQ.html
   117  * </pre></blockquote>
   117  * </pre></blockquote>
   118  * it would be a shorthand for:
   118  * it would be a shorthand for:
   119  * <blockquote><pre>
   119  * <blockquote><pre>
   120  *     http://java.sun.com/FAQ.html
   120  *     http://www.example.com/FAQ.html
   121  * </pre></blockquote>
   121  * </pre></blockquote>
   122  * <p>
   122  * <p>
   123  * The relative URL need not specify all the components of a URL. If
   123  * The relative URL need not specify all the components of a URL. If
   124  * the protocol, host name, or port number is missing, the value is
   124  * the protocol, host name, or port number is missing, the value is
   125  * inherited from the fully specified URL. The file component must be
   125  * inherited from the fully specified URL. The file component must be