All pastes #985744 Raw Edit

Https

public text v1 · immutable
·published 2008-04-15 09:00 UTC
rendered paste body
try
		{
			URL url=new URL("http://www.google.co.in");
			URLConnection urlConn=url.openConnection();
			HttpsURLConnection https = (HttpsURLConnection)urlConn;
			https.connect();

			InputStream is=https.getInputStream();
			BufferedReader bufferedReader=new BufferedReader(new InputStreamReader(is));
			String temp=null;
			while((temp=bufferedReader.readLine())!=null)
			{
				System.out.println(temp);
			}
		}
		
		catch(MalformedURLException mue)
		{
			mue.printStackTrace();
		}
		
		catch(IOException ioe)
		{
			ioe.printStackTrace();
		}