62,628
社区成员
发帖
与我相关
我的任务
分享URLConnection connection = realURL.openConnection();
connection.connect();
in = new BufferedReader(new InputStreamReader(
connection.getInputStream(), "GBK"));
String line;
while(null != (line = in.readLine())) {
urlContent += line;
}p = Pattern.compile("class.+?l_pic.+?href=\"(.+?)\"");
m = p.matcher(content);do{
line = in.readLine();
if(line.length()> Integer.MAX_VALUE)
shortcontent = "";
shortcontent += line;
m = p.matcher(shortcontent);
}while(null != line && m.find());