Java tutorial
//package com.java2s; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; public class Main { public static InputStream getFileInputStream(String path) { File file = new File(path); try { return new FileInputStream(file); } catch (FileNotFoundException e) { e.printStackTrace(); return null; } } }