1. Download our Official Android App: Forums for Android!

Support Unable to read content from internet calendar file in android using buffered stream

Discussion in 'Android Help' started by Noman Ud Din, Mar 21, 2016.

  1. Noman Ud Din

    Noman Ud Din Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    4
    Joined:
    Oct 9, 2015

    Oct 9, 2015
    4
    0
    5
    Male
    My code is working fine with a dropbox and my website shared link for same file. But when I try to access the same file from the OWA(rackspace) server, my code fails to do the job.

    Any suggestion?

    Link to file:
    http://mex09.emailsrvr.com/owa/cale...cf069e27098835125317850467726104/calendar.ics

    Code:
    URL url =new URL("http://mex09.emailsrvr.com/owa/cale...cf069e27098835125317850467726104/calendar.ics");
    BufferedReader in =newBufferedReader(newInputStreamReader(url.openStream()));
    String line =null;
    String output ="";
    for(line = in.readLine(); line !=null; line = in.readLine()){
    response.append(line);
    System.out.println(line);
    response.append("\n");
    }
    in.close();

    Thanks in advance
     

    Advertisement

Share This Page

Loading...