index = user.indexOf(':'); if(index != -1) { password = user.substring(index + 1); user = user.substring(0,index); } else password = null;
	public FtpAddress(String url)	{		if(!url.startsWith(FtpVFS.PROTOCOL + ":"))			throw new IllegalArgumentException();		// remove any leading slashes, and ftp: from URL		int trimAt = 4;		for(int i = 4; i < url.length(); i++)		{			if(url.charAt(i) != '/')			{				trimAt = i;				break;			}		}		url = url.substring(trimAt);		// get username/password		int index = url.indexOf('@');		if(index == -1)			user = password = null;		else		{			user = url.substring(0,index);			url = url.substring(index + 1);			index = user.indexOf(':');			if(index != -1)			{				password = user.substring(index + 1);				user = user.substring(0,index);			}			else				password = null;		}		// get host name and path		index = url.indexOf('/');		if(index == -1)			index = url.length();		host = url.substring(0,index);		path = url.substring(index);		if(path.length() == 0)			path = "/";		index = host.indexOf(':');		if(index == -1)			port = "21";		else		{			port = host.substring(index + 1);			host = host.substring(0,index);		}	}