public interface ConnectionFactory
URL
instance, produces an HttpURLConnection
.Modifier and Type | Method and Description |
---|---|
HttpURLConnection |
openConnection(URL url)
Creates a new
HttpURLConnection from the given url . |
HttpURLConnection openConnection(URL url) throws IOException, ClassCastException
HttpURLConnection
from the given url
.url
- the URL to which the connection will be madeIOException
- if there was a problem producing the connectionClassCastException
- if the URL is not for an HTTP endpointCopyright © 2011–2020 Google. All rights reserved.