Here you can find the source of getInputStream(String filePath)
private static InputStream getInputStream(String filePath) throws FileNotFoundException
//package com.java2s; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; public class Main { private static InputStream getInputStream(String filePath) throws FileNotFoundException { return new FileInputStream(filePath); }// w w w. ja v a2 s . c om private static InputStream getInputStream(File file) throws FileNotFoundException { if (file == null) { return null; } return new FileInputStream(file); } }