public String readURL(String address) throws Exception
{
URL url = new URL(address);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setReadTimeout(5000);
conn.setConnectTimeout(5000);
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buff = new byte[1024];
InputStream in = conn.getInputStream();
int read;
while((read = in.read(buff)) != -1)
out.write(buff, 0, read);
return out.toString().replaceAll("[\\s]+", " ");
}