URL urlval = new URL(new URL(url), "",
new URLStreamHandler(){
@Override
protected URLConnection openConnection(URL url) throws IOException {
URL target = new URL(url.toString());
URLConnection connection = target.openConnection();
// Connection settings
connection.setConnectTimeout(seconds*1000);
connection.setReadTimeout(seconds*1000);
return(connection);
}
});