1
2
3
4
5
6
7
8
9
10
package interesting;
import java.net.*;
import java.io.*;
public class URLReader {
public static void main(String[] args) throws Exception {
URL url = new URL("http://itmagix.blogspot.in/");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inputLine;
1
2
3
4
5
6
7
8
9
10
package interesting;
import java.net.URL;
public class ParseURL {
public static void main(String[] args) throws Exception {
URL aURL = new URL("http://itmagix.blogspot.in/");
System.out.println("protocol = " + aURL.getProtocol());
System.out.println("userinfo = "+aURL.getUserInfo());
1
2
3
1
2
3
1
2
3
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.