Source Code : URL Get
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
URL Get
import java.io.*;
import java.net.*;
public class URLGet
{
public static void main(String[] args) {
BufferedReader in=null;
if (args.length == 1) {
try {
URL url = new URL(args[0]);
in = new BufferedReader(new InputStreamReader(url.openStream()));
String line=null;
while ((line=in.readLine()) != null)
System.out.println(line);
}
catch (MalformedURLException ex) {
System.err.println(ex);
}
catch (FileNotFoundException ex) {
System.err.println("Failed to open stream to URL: "+ex);
}
catch (IOException ex) {
System.err.println("Error reading URL content: "+ex);
}
if (in != null)
try {in.close();} catch (IOException ex) {}
}
else
System.err.println ("Usage: URLGet URL");
}
}
Thank with us