请教一下,JAVA如何读取一个本地文件夹下的所有HTML文件呢?并且只正则出超级链接即可。传统的方式中,
URL url = new URL(strUrl);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
InputStream is = null;
is = url.openStream();这些应该不适应了吧,
URL url = new URL(strUrl);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
InputStream is = null;
is = url.openStream();这些应该不适应了吧,
byte[] b = new byte[1024];
int size = is.read(b);
return new String(b,0,size);大概写了一下,也就这意思吧。