String ref = url.getRef(); if (ref != null && ref.length() > 0) result.append('#').append(ref);
	protected String toExternalForm(URL url) {		StringBuffer result = new StringBuffer(url.getProtocol());		result.append("://"); //$NON-NLS-1$		String bundleId = url.getHost();		if ((bundleId != null) && (bundleId.length() > 0))			result.append(bundleId);		int index = url.getPort();		if (index > 0)			result.append(':').append(index);		String path = url.getPath();		if (path != null) {			if ((path.length() > 0) && (path.charAt(0) != '/')) /* if name doesn't have a leading slash */			{				result.append("/"); //$NON-NLS-1$			}			result.append(path);		}		return (result.toString());	}