Code example for URLConnection

Methods: getContent

0
		results.image = null;
    	try 
		{ 
			URL url = new URL(photoAddress);
			URLConnection urlCon = url.openConnection();
			InputStream input = (InputStream)urlCon.getContent();
			results.image = Drawable.createFromStream(input, "src name");
		} 
		catch (MalformedURLException e)
        { 
        } 
        catch (IOException e)
        { 
        } 
    } 
	 
	private void clearTempStrings() // kasuje tymczasowe warto�ci zczytywane z JSON 
    { 
		results.productName = "";
		results.availableText = "";
		results.companyName = "brak";