private InputStream connect ( String url ) throws IOException { URLConnection conn = new URL ( URL_BASE + url ) . openConnection ( ) ; conn . setConnectTimeout ( CONNECT_TIMEOUT ) ; conn . setReadTimeout ( READ_TIMEOUT ) ; conn . setRequestProperty ( "User-Agent" , USER_AGENT ) ; return conn . getInputStream ( ) ; }
Open the connection to the server .