Skip to content Skip to sidebar Skip to footer

Issue Extracting HTML Data Via Android

I have an android jsoup based app which I'm using to pull data from an HTML table however I'm unable to extract data from the following url: http://sheriff.org/apps/arrest/results.

Solution 1:

Alternatively, you can extract all data of a link by using the HttpURLConnection.

HttpURLConnection con=(HttpURLConnection)url.openConnection();

InputStream is=con.getInputStream();

FileOutputStream fos=new FileOutputStream(storeDir+"/"+filename);

int data=0;

  while((data=is.read())!=-1){

    fos.write(data);

   }

is.close();

fos.flush();

fos.close();

You might want to check this site for more information http://dev-androidapps.blogspot.com/2013/09/web-download.html.


Post a Comment for "Issue Extracting HTML Data Via Android"