Hello,
I want to read data from URL (http://84.100.130.82:8000/;stream.nsv). But can not do it. Because when try to call function openDataInputStream() shows this error: java.io.IOException: response does not start with HTTP it starts with: ICY.
How I can fix this bug?
Regards, RamunasCode:HttpConnection c = null; InputStream is = null; OutputStream os = null; StringBuffer b = new StringBuffer(); String response, responseLitle; c = (HttpConnection)Connector.open(“http://84.100.130.82:8000/;stream.nsv”); os = c.openOutputStream(); os.flush(); is = c.openDataInputStream(); // ERROR CODE HERE int ch; // receive output while ((ch = is.read()) != -1) { b.append((char) ch); } response = b.toString();

Reply With Quote


