if (authority.length() != 0) { sb.append(" }
if (authority.length() != 0 || file.startsWith(" sb.append(" else
  protected String toExternalForm(URL url)  {    String protocol;    String file;    String ref;    String authority;    protocol = url.getProtocol();    authority = url.getAuthority();    if (authority == null)      authority = "";    file = url.getFile();    ref = url.getRef();		// Guess a reasonable size for the string buffer so we have to resize		// at most once.    int size = protocol.length() + authority.length() + file.length() + 24;		StringBuffer sb = new StringBuffer(size);    if (protocol.length() > 0)      {			sb.append(protocol);			sb.append(":");		}    if (authority.length() != 0)      {	sb.append("//").append(authority);      }		sb.append(file);		if (ref != null)			sb.append('#').append(ref);		return sb.toString();	}