Here you can find the source of getInputStream(URL sourceURL)
public static InputStream getInputStream(URL sourceURL)
//package com.java2s; import java.io.InputStream; import java.net.URL; public class Main { public static InputStream getInputStream(URL sourceURL) { InputStream is = null;/* w ww . j av a 2s.c o m*/ try { is = sourceURL.openStream(); } catch (Exception e) { // do nothing, file does not yet exist } return is; } }