code: public static InputStream getInputStreamFromHttp(String httpFileURL) throws IOException {
  
          URLConnection urlConnection = null;
          urlConnection = new URL(httpFileURL).openConnection();
          urlConnection.connect();
          return urlConnection.getInputStream();
      }
docs: Get destination web file input stream.
  
  @param httpFileURL
  the web file url which you want to download.
  @return the destination page input stream.
  @throws IOException