Here you can find the source of getInputStream(final File file)
public static FileInputStream getInputStream(final File file)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; public class Main { public static FileInputStream getInputStream(final File file) { try {//from ww w . j a v a 2 s. c o m return new FileInputStream(file); } catch (FileNotFoundException e) { return null; } } public static FileInputStream getInputStream(final String path) { return getInputStream(getFile(path)); } public static File getFile(final String path) { return new File(path); } }