import java.net.*;
import java.util.StringTokenizer;
import java.io.*;
public class ReadURL
{
public static void main(String[] args) throws Exception
{
URL yahoo = new URL("http://aintmeekcoder.blogspot.com");
BufferedReader in = new BufferedReader(new InputStreamReader(yahoo.openStream()));
String inputLine;
int loc;
while ((inputLine = in.readLine()) != null)
{
if ((loc=inputLine.indexOf("
{
for (int i=loc+9; inputLine.charAt(i)!='>'; i++)
{
System.out.print(inputLine.charAt(i));
}
System.out.println();
}
}
in.close();
}
}
No comments:
Post a Comment