241 |
if (factory != null) |
if (factory != null) |
242 |
{ |
{ |
243 |
ph = factory.createURLStreamHandler(protocol); |
ph = factory.createURLStreamHandler(protocol); |
244 |
if (ph == null) |
if (ph != null) |
245 |
return null; |
{ |
246 |
|
if (cache_handlers) |
247 |
|
ph_cache.put(protocol, ph.getClass()); |
248 |
|
|
249 |
if (cache_handlers) |
return(ph); |
250 |
ph_cache.put(protocol, ph.getClass()); |
} |
|
|
|
|
return(ph); |
|
251 |
} |
} |
252 |
|
|
253 |
// Finally loop through our search path looking for a match |
// Finally loop through our search path looking for a match |
587 |
*/ |
*/ |
588 |
public String getPath() |
public String getPath() |
589 |
{ |
{ |
590 |
int quest = file.indexOf('?'); |
int quest = (file == null) ? -1 : file.indexOf('?'); |
591 |
return quest < 0 ? file : file.substring(0, quest); |
return quest < 0 ? getFile() : file.substring(0, quest); |
592 |
} |
} |
593 |
|
|
594 |
/** |
/** |
659 |
*/ |
*/ |
660 |
public String getUserInfo () |
public String getUserInfo () |
661 |
{ |
{ |
662 |
int at = host.indexOf('@'); |
int at = (host == null) ? -1 : host.indexOf('@'); |
663 |
return at < 0 ? null : host.substring(0, at); |
return at < 0 ? null : host.substring(0, at); |
664 |
} |
} |
665 |
|
|
671 |
*/ |
*/ |
672 |
public String getQuery () |
public String getQuery () |
673 |
{ |
{ |
674 |
int quest = file.indexOf('?'); |
int quest = (file == null) ? -1 : file.indexOf('?'); |
675 |
return quest < 0 ? null : file.substring(quest + 1, file.length()); |
return quest < 0 ? null : file.substring(quest + 1, file.length()); |
676 |
} |
} |
677 |
|
|