java.net.HttpURLConnection httpURLConnection = (java.net.HttpURLConnection) url.openConnection();
httpURLConnection.setDoInput(true);
httpURLConnection.setRequestMethod("GET");
httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
httpURLConnection.connect();
InputStream inputStream = httpURLConnection.getInputStream();
byte[] byteArray = new byte[1024];
int len = 0;
int ascii = inputStream.read();
byteArray[len] = (byte) ascii;
while (ascii > -1) {
ascii = inputStream.read();
len ++;
byteArray[len] = (byte) ascii;
}
result = new String(byteArray, 0, len);