Lines Matching defs:URL

38  * Class <code>URL</code> represents a Uniform Resource
49 * In general, a URL can be broken into several parts. The previous
50 * example of a URL indicates that the protocol to use is
58 * the URL is called the <i>path</i> component.
60 * A URL can optionally specify a "port", which is the
70 * The syntax of <code>URL</code> is defined by <a
78 * A URL may have appended to it a "fragment", also known
85 * This fragment is not technically part of the URL. Rather, it
91 * An application can also specify a "relative URL",
93 * relative to another URL. Relative URLs are frequently used within
94 * HTML pages. For example, if the contents of the URL:
98 * contained within it the relative URL:
107 * The relative URL need not specify all the components of a URL. If
109 * inherited from the fully specified URL. The file component must be
112 * The URL class does not itself encode or decode any URL components
115 * escaped prior to calling URL, and also to decode any escaped fields,
116 * that are returned from URL. Furthermore, because URL has no knowledge
117 * of URL escaping, it does not recognise equivalence between the encoded
118 * or decoded form of the same URL. For example, the two URLs:<br>
135 public final class URL implements java.io.Serializable {
179 * The query part of this URL.
184 * The authority part of this URL.
190 * The path part of this URL.
195 * The userinfo part of this URL.
212 * The URLStreamHandler for this URL.
222 * Creates a <code>URL</code> object from the specified
236 * indicates that the URL should use the default port for the
239 * If this is the first URL object being created with the specified
293 * @see java.net.URL#setURLStreamHandlerFactory(
299 public URL(String protocol, String host, int port, String file)
306 * Creates a URL from the specified <code>protocol</code>
320 * @see java.net.URL#URL(java.lang.String, java.lang.String,
323 public URL(String protocol, String host, String file)
329 * Creates a <code>URL</code> object from the specified
333 * the URL should use the default port for the protocol. Specifying
334 * a <code>handler</code> of <code>null</code> indicates that the URL
337 * java.net.URL#URL(java.lang.String, java.lang.String, int,
352 * @param handler the stream handler for the URL.
359 * @see java.net.URL#setURLStreamHandlerFactory(
367 public URL(String protocol, String host, int port, String file,
409 // Note: we don't do validation of the URL here. Too risky to change
419 * Creates a <code>URL</code> object from the <code>String</code>
425 * @param spec the <code>String</code> to parse as a URL.
428 * @see java.net.URL#URL(java.net.URL, java.lang.String)
430 public URL(String spec) throws MalformedURLException {
435 * Creates a URL by parsing the given spec within a specified context.
437 * The new URL is created from the given context URL and the spec
445 * authority, and query components are undefined, then the new URL is a
447 * parts present in the spec are used in the new URL.
450 * the scheme of the context, then the new URL is created as an absolute
451 * URL based on the spec alone. Otherwise the scheme component is inherited
452 * from the context URL.
457 * spec then the authority of the new URL will be inherited from the
469 * For a more detailed description of URL parsing, refer to RFC2396.
472 * @param spec the <code>String</code> to parse as a URL.
475 * @see java.net.URL#URL(java.lang.String, java.lang.String,
478 * @see java.net.URLStreamHandler#parseURL(java.net.URL,
481 public URL(URL context, String spec) throws MalformedURLException {
486 * Creates a URL by parsing the given spec with the specified handler
491 * @param spec the <code>String</code> to parse as a URL.
492 * @param handler the stream handler for the URL.
499 * @see java.net.URL#URL(java.lang.String, java.lang.String,
502 * @see java.net.URLStreamHandler#parseURL(java.net.URL,
505 public URL(URL context, String spec, URLStreamHandler handler)
536 /* we're assuming this is a ref relative to the context URL.
538 * ref URL's like: "hello:there" w/ a ':' in them.
565 // If the context is a hierarchical URL scheme and the spec
653 * Sets the fields of the URL. This is not a public method so that
654 * only URLStreamHandlers can modify URL fields. URLs are
661 * @param ref the internal reference in the URL
673 * URL has been changed. */
686 * Sets the specified 8 fields of the URL. This is not a public method so
687 * that only URLStreamHandlers can modify URL fields. URLs are otherwise
696 * @param ref the internal reference in the URL
697 * @param query the query part of this URL
712 * URL has been changed. */
721 * Gets the query part of this <code>URL</code>.
723 * @return the query part of this <code>URL</code>,
732 * Gets the path part of this <code>URL</code>.
734 * @return the path part of this <code>URL</code>, or an
743 * Gets the userInfo part of this <code>URL</code>.
745 * @return the userInfo part of this <code>URL</code>, or
754 * Gets the authority part of this <code>URL</code>.
756 * @return the authority part of this <code>URL</code>
764 * Gets the port number of this <code>URL</code>.
774 * with this <code>URL</code>. If the URL scheme or the URLStreamHandler
775 * for the URL do not define a default port number,
786 * Gets the protocol name of this <code>URL</code>.
788 * @return the protocol of this <code>URL</code>.
795 * Gets the host name of this <code>URL</code>, if applicable.
800 * @return the host name of this <code>URL</code>.
807 * Gets the file name of this <code>URL</code>.
814 * @return the file name of this <code>URL</code>,
823 * <code>URL</code>.
826 * <code>URL</code>, or <CODE>null</CODE> if one does not exist
833 * Compares this URL for equality with another object.<p>
835 * If the given object is not a URL then this method immediately returns
838 * Two URL objects are equal if they have the same protocol, reference
853 * @param obj the URL to compare against.
858 if (!(obj instanceof URL))
860 URL u2 = (URL)obj;
868 * The hash code is based upon all the URL components relevant for URL
871 * @return a hash code for this <code>URL</code>.
884 * Returns <code>true</code> if this <code>URL</code> and the
888 * @param other the <code>URL</code> to compare against.
892 public boolean sameFile(URL other) {
897 * Constructs a string representation of this <code>URL</code>. The
902 * @see java.net.URL#URL(java.lang.String, java.lang.String, int,
904 * @see java.net.URLStreamHandler#toExternalForm(java.net.URL)
911 * Constructs a string representation of this <code>URL</code>. The
916 * @see java.net.URL#URL(java.lang.String, java.lang.String,
918 * @see java.net.URLStreamHandler#toExternalForm(java.net.URL)
925 * Returns a {@link java.net.URI} equivalent to this URL.
927 * <p>Note, any URL instance that complies with RFC 2396 can be converted
931 * @exception URISyntaxException if this URL is not formatted strictly according to
934 * @return a URI instance equivalent to this URL.
944 * {@code URL}.
948 * {@linkplain java.net.URLStreamHandler#openConnection(URL)
949 * URLStreamHandler.openConnection(URL)} method of the protocol handler for
950 * this URL.</P>
956 * <P>If for the URL's protocol (such as HTTP or JAR), there
965 * to the URL.
967 * @see java.net.URL#URL(java.lang.String, java.lang.String,
986 * @return a <code>URLConnection</code> to the URL.
996 * @see java.net.URL#URL(java.lang.String, java.lang.String,
999 * @see java.net.URLStreamHandler#openConnection(java.net.URL,
1024 * Opens a connection to this <code>URL</code> and returns an
1031 * @return an input stream for reading from the URL connection.
1033 * @see java.net.URL#openConnection()
1041 * Gets the contents of this URL. This method is a shorthand for:
1046 * @return the contents of this URL.
1055 * Gets the contents of this URL. This method is a shorthand for:
1061 * @return the content object of this URL that is the first match of
1096 * @see java.net.URL#URL(java.lang.String, java.lang.String,
1246 * WriteObject is called to save the state of the URL to an
1262 * readObject is called to restore the state of the URL from the
1263 * stream. It reads the components of the URL and finds the local