private static void getMail(String mail) throws IOException {
URL url = new URL(mail);
HttpURLConnection conn = (HttpsURLConnection)url.openConnection();
InputStream is = conn.getInputStream();
//InputStream is = (InputStream) conn.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is,"utf-8"));
String regex = "\\w+@[0-9a-z]{2,8}\\.com";
Pattern compile = Pattern.compile(regex);
String str;
while((str=br.readLine())!=null) {
Matcher matcher = compile.matcher(str);
while(matcher.find()) {
System.out.println("邮箱:"+matcher.group());
}
}
}