public boolean init(String user_name){
		username=user_name;
		valid_regex=">No such user.<";
		valid_pat=Pattern.compile(valid_regex);
		urlstr="http://acm.hdu.edu.cn/userstatus.php?user="+username;
		try{
		url=new URL(urlstr);
		in=url.openStream();
		read = new InputStreamReader(in,"UTF-8"); 
		br=new BufferedReader(read);
		while((strline=br.readLine())!=null){
			valid_mat=valid_pat.matcher(strline);
			if(valid_mat.find())
				return false;
		}
		
		}
		catch(Exception e){
			e.printStackTrace();
		}
		
		urlstr="http://acm.hdu.edu.cn/status.php?user="+username+"&status=5";
		filename="E:\\doc\\"+username+"_profile.txt";
		try{
		url=new URL(urlstr);
		in=url.openStream();
		read = new InputStreamReader(in,"UTF-8"); 
		br=new BufferedReader(read);
		}
		catch(Exception e){
			e.printStackTrace();
		}
		
		try{
			file=new File(filename);
			write = new OutputStreamWriter(new FileOutputStream(file),"UTF-8");
			bw=new BufferedWriter(write);
			
		}
		catch(Exception e){
			e.printStackTrace();
		}
		
		
		runid_regex="px>\\d+";
		time_regex="\\d+-\\d+-\\d+ \\d+:\\d+:\\d+";
		pro_regex=">\\d+</a>";
		last_regex="Next Page";
		solved_regex="(\\d+,[1-9]\\d*,\\d+)";
		rank_regex="td>Rank\\D+\\d+";
		submit_regex="Problems Submitted\\D+\\d+";
		prosolved_regex="Problems Solved\\D+\\d+";
		submission_regex="td>Submissions\\D+\\d+";
		accept_regex="Accepted\\D+\\d+";
		
		
		runid_pat=Pattern.compile(runid_regex);
		time_pat=Pattern.compile(time_regex);
		pro_pat=Pattern.compile(pro_regex);
		last_pat=Pattern.compile(last_regex);
		solved_pat=Pattern.compile(solved_regex);
		rank_pat=Pattern.compile(rank_regex);
		submit_pat=Pattern.compile(submit_regex);
		prosolved_pat=Pattern.compile(prosolved_regex);
		submission_pat=Pattern.compile(submission_regex);
		accept_pat=Pattern.compile(accept_regex);
		
		return true;
	}