protected boolean connect(String path,String addr,int port,String username,String password ){
		boolean result=false;
		ftp=new FTPClient();
		int reply;
		try {
			ftp.connect(addr, port);
			ftp.login(username, password);
	        reply = ftp.getReplyCode();    
	        if (!FTPReply.isPositiveCompletion(reply)) {      
	            ftp.disconnect();      
	            return result;      
	        }      
	        ftp.changeWorkingDirectory(path);      
	        result = true;      
	        return result;     
		} catch (SocketException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return false;
	}