448 |
// if one exists, otherwise pass the end of the string. |
// if one exists, otherwise pass the end of the string. |
449 |
int hashAt = spec.indexOf('#', colon + 1); |
int hashAt = spec.indexOf('#', colon + 1); |
450 |
this.ph.parseURL(this, spec, colon + 1, |
this.ph.parseURL(this, spec, colon + 1, |
451 |
hashAt < 0 ? spec.length() : hashAt); |
hashAt < 0 ? spec.length() : hashAt); |
452 |
if (hashAt >= 0) |
if (hashAt >= 0) |
453 |
ref = spec.substring(hashAt + 1); |
ref = spec.substring(hashAt + 1); |
454 |
|
|
465 |
* |
* |
466 |
* @return true if the URL is equal, false otherwise |
* @return true if the URL is equal, false otherwise |
467 |
*/ |
*/ |
468 |
public boolean equals(Object obj) |
public boolean equals (Object obj) |
469 |
{ |
{ |
470 |
if (obj == null || ! (obj instanceof URL)) |
if (obj == null || ! (obj instanceof URL)) |
471 |
return false; |
return false; |
792 |
} |
} |
793 |
} |
} |
794 |
|
|
795 |
// Next check the factory and use that if set |
// If a non-default factory has been set, use it to find the protocol. |
796 |
if (factory != null) |
if (factory != null) |
797 |
{ |
{ |
798 |
ph = factory.createURLStreamHandler(protocol); |
ph = factory.createURLStreamHandler(protocol); |