日期:2014-05-20 浏览次数:20739 次
public void loginPmis(String username,String password) throws URISyntaxException{
uri = new URI(head+"/LoginAction.do?account="+username+"&password="+password+"");
this.util();
}
public void showAppointTask(String Task_type) throws URISyntaxException{
uri=new URI(head+"/MyTaskAction.do?method=getMyTaskList&task_state_id="+Task_type);
this.util();
}
public void saveOk(String hiddenemp) throws URISyntaxException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String ly_time = sdf.format(new java.util.Date());
String str=ly_time.substring(0, 10);
uri = new URI(head+"/DealTaskList.do?method=getSubTask&projId="+projId+"&task_actual_manhour="
+task_actual_manhour+"&code_size="+code_size+"&task_id="+task_id+"&actual_date="
+str+"&helpemp=-1&hiddenemp="+hiddenemp);
this.util();
}
public static void main(String[] args) throws MalformedURLException,Exception {
HttpURLConnection conn = (HttpURLConnection) new URL("http://bbs.csdn.net/forums/Java").openConnection();
BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
BufferedReader br = new BufferedReader(new InputStreamReader(bis));
String line = null;
while ((line = br.readLine()) != null) {
if (line.contains("target=\"_blank\" title=\"")) {
System.out.println(line.replaceAll(".*?title=\"([^\"].+?)\".*+", "$1"));
}
}
br.close();
}