271 |
String file = url.getFile(); |
String file = url.getFile(); |
272 |
String anchor = url.getRef(); |
String anchor = url.getRef(); |
273 |
|
|
274 |
return(((protocol != null) ? (protocol + "://") : "") + |
StringBuffer sb = new StringBuffer(PlatformHelper.INITIAL_MAX_PATH); |
275 |
((host != null) ? host : "") + |
|
276 |
((port != -1) ? (":" + port) : "") + |
if (protocol != null){ |
277 |
((file != null) ? file : "/") + |
sb.append(protocol); |
278 |
((anchor != null) ? ("#" + anchor) : "")); |
sb.append("://"); |
279 |
|
} |
280 |
|
|
281 |
|
if (host != null) |
282 |
|
sb.append(host); |
283 |
|
|
284 |
|
if (port != -1){ |
285 |
|
sb.append(':'); |
286 |
|
sb.append(port); |
287 |
|
} |
288 |
|
|
289 |
|
if (file != null) |
290 |
|
sb.append(file); |
291 |
|
else |
292 |
|
sb.append('/'); |
293 |
|
|
294 |
|
if (anchor != null){ |
295 |
|
sb.append('#'); |
296 |
|
sb.append(anchor); |
297 |
|
} |
298 |
|
|
299 |
|
return sb.toString(); |
300 |
|
|
301 |
} |
} |
302 |
|
|
303 |
/*************************************************************************/ |
/*************************************************************************/ |