/** * Constructs a string representation of this <code>URL</code>. The string is created by calling * the <code>toExternalForm</code> method of the stream protocol handler for this object. * * @return a string representation of this object. * @see java.net.URL#URL(java.lang.String, java.lang.String, int, java.lang.String) * @see java.net.URLStreamHandler#toExternalForm(java.net.URL) */ public String toExternalForm() { return handler.toExternalForm(this); }
/** * Returns a String representing this URL. Identical to toExternalForm(). The value returned is * created by the protocol handler's toExternalForm method. Overrides Object.toString() * * @return A string for this URL */ public String toString() { // Identical to toExternalForm(). return ph.toExternalForm(this); }