U can convert Static URL to HTML code( HMTL content).
public String URLReader(String myurl) throws Exception {
//System.out.println("inside util");
String returnLine = "" ;
try{
public String URLReader(String myurl) throws Exception {
//System.out.println("inside util");
String returnLine = "" ;
try{
String inputLine = "" ;
if(myurl != null && !myurl.equals(""))
{
URL url = new URL(myurl) ;
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream())) ;
if(myurl != null && !myurl.equals(""))
{
URL url = new URL(myurl) ;
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream())) ;
while ((inputLine = br.readLine()) != null)
{
returnLine=returnLine+inputLine;
}
br.close();
}
{
returnLine=returnLine+inputLine;
}
br.close();
}
}catch(Exception e)
{
//throw e;
}
return returnLine;
}
{
//throw e;
}
return returnLine;
}
No comments:
Post a Comment
Please Provide your feedback here