com.threerings.getdown.util
Class ConnectionUtil

java.lang.Object
  extended by com.threerings.getdown.util.ConnectionUtil

public class ConnectionUtil
extends Object


Constructor Summary
ConnectionUtil()
           
 
Method Summary
static URLConnection open(URL url)
          Opens a connection to a URL, setting the authentication header if user info is present.
static HttpURLConnection openHttp(URL url)
          Opens a connection to a http or https URL, setting the authentication header if user info is present.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionUtil

public ConnectionUtil()
Method Detail

open

public static URLConnection open(URL url)
                          throws IOException
Opens a connection to a URL, setting the authentication header if user info is present.

Throws:
IOException

openHttp

public static HttpURLConnection openHttp(URL url)
                                  throws IOException
Opens a connection to a http or https URL, setting the authentication header if user info is present. Throws a class cast exception if the connection returned is not the right type.

Throws:
IOException


Copyright © 2013. All Rights Reserved.