Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.DataInputStream;

import java.net.HttpURLConnection;
import java.net.URL;

public class Main {

    public static DataInputStream getStream(String filePath) throws Exception {
        URL url1 = new URL(filePath);
        HttpURLConnection conn = (HttpURLConnection) url1.openConnection();
        DataInputStream in = new DataInputStream(conn.getInputStream());
        return in;
    }
}