Java tutorial
//package com.java2s; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; public class Main { protected static InputStream getInputStream(String path) throws IOException { URL url = new URL(path); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); return connection.getInputStream(); } }