- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
String url = "http://*.*.*.*:*/java/?code=" + sCode + "&request=monitor";
String LogPass = sName + ":" + sPass;
String sAuth = "Basic " + encodeBase64(LogPass);
try
{
con = (HttpConnection)Connector.open(url);
con.setRequestMethod("GET");
con.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Confirguration/CLDC-1.0");
con.setRequestProperty("Accept_Language", "en-US");
con.setRequestProperty("Content-Type", "//text plain");
con.setRequestProperty("Connection", "close");
con.setRequestProperty("Authorization", sAuth);
in = con.openInputStream();
if(con.getResponseCode() == 200)
{
StringBuffer sb = new StringBuffer();
int chr;
while((chr = in.read()) != -1)
sb.append((char)(chr < 192 || chr > 255 ? chr : chr + 848));
sBuff = sb.toString();
}
}