Modifier and Type | Class and Description |
---|---|
class |
JavaUrl.JavaConnection
An implementation of the
Connection interface backed by the
built-in Java URLConnection class. |
Url.Connection
Constructor and Description |
---|
JavaUrl(java.net.URL url) |
Modifier and Type | Method and Description |
---|---|
Url.Connection |
openConnection()
Open a new connection to the target location.
|
void |
setTimeout(int timeout)
Set the timeout.
|
public void setTimeout(int timeout)
Url
setTimeout
in interface Url
timeout
- connect/read/write timeout in milliseconds.public Url.Connection openConnection() throws java.io.IOException
Url
openConnection
in interface Url
#Connection
linking to the URL.java.io.IOException
- if an I/O exception occurs.