Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;

public class Main {
    public static InputStream getInputStream(HttpURLConnection connection) {
        if (connection != null) {
            try {
                InputStream inputStream = connection.getInputStream();
                return inputStream;
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return null;
    }
}