Internet Connection With Blackberry Java
String url= "http://www.test.com/test.jsp"
HttpConnection hc = (HttpConnection) Connector.open(url);
hc.setRequestMethod(HttpConnection.GET);
InputStream inputStream = hc.openInputStream();
if (DeviceInfo.isSimulator()) {
url = url + ";deviceSide=true";
}
String result = "";
for (int ch = inputStream.read(); ch != -1; ch = inputStream.read()) {
result = result + (char) ch;
}
No comments:
Post a Comment