Fatal Error :1:1: Premature end of file. Error reading url

cobroi

New Member
Hello i am trying to read a URL feed with an interval and store it as an object. However when i try to run it, it gives me this error [Fatal Error] :1:1: Premature end of file.Here is the code:thisUrl is a static http address\[code\]url = new URL(thisUrl);URLstream = url.openStream();ir = new InputStreamReader(URLstream);buff = new BufferedReader(ir);String xObject = "";while (buff.ready()) { String temp = buff.readLine(); xObject += temp;}\[/code\]After using the stream i will close it\[code\]URLstream.close();ir.close();buff.close();\[/code\]
 
Back
Top