src/share/classes/java/net/URL.java

Print this page

        

*** 78,88 **** * <p> * A URL may have appended to it a "fragment", also known * as a "ref" or a "reference". The fragment is indicated by the sharp * sign character "#" followed by more characters. For example, * <blockquote><pre> ! * http://java.sun.com/index.html#chapter1 * </pre></blockquote> * <p> * This fragment is not technically part of the URL. Rather, it * indicates that after the specified resource is retrieved, the * application is specifically interested in that part of the --- 78,88 ---- * <p> * A URL may have appended to it a "fragment", also known * as a "ref" or a "reference". The fragment is indicated by the sharp * sign character "#" followed by more characters. For example, * <blockquote><pre> ! * http://www.oracle.com/technetwork/java/index.html#chapter1 * </pre></blockquote> * <p> * This fragment is not technically part of the URL. Rather, it * indicates that after the specified resource is retrieved, the * application is specifically interested in that part of the
*** 92,110 **** * An application can also specify a "relative URL", * which contains only enough information to reach the resource * relative to another URL. Relative URLs are frequently used within * HTML pages. For example, if the contents of the URL: * <blockquote><pre> ! * http://java.sun.com/index.html * </pre></blockquote> * contained within it the relative URL: * <blockquote><pre> * FAQ.html * </pre></blockquote> * it would be a shorthand for: * <blockquote><pre> ! * http://java.sun.com/FAQ.html * </pre></blockquote> * <p> * The relative URL need not specify all the components of a URL. If * the protocol, host name, or port number is missing, the value is * inherited from the fully specified URL. The file component must be --- 92,110 ---- * An application can also specify a "relative URL", * which contains only enough information to reach the resource * relative to another URL. Relative URLs are frequently used within * HTML pages. For example, if the contents of the URL: * <blockquote><pre> ! * http://www.oracle.com/technetwork/java/index.html * </pre></blockquote> * contained within it the relative URL: * <blockquote><pre> * FAQ.html * </pre></blockquote> * it would be a shorthand for: * <blockquote><pre> ! * http://www.oracle.com/technetwork/java/index.html * </pre></blockquote> * <p> * The relative URL need not specify all the components of a URL. If * the protocol, host name, or port number is missing, the value is * inherited from the fully specified URL. The file component must be