public static FileInputStream openInputStream(final File file) throws IOException {
        if (file.exists()) {
            if (file.isDirectory()) {
                throw new IOException("File '" + file + "' exists but is a directory");
            }
            if (file.canRead() == false) {
                throw new IOException("File '" + file + "' cannot be read");
            }
        } else {
            throw new FileNotFoundException("File '" + file + "' does not exist");
        }
        return new FileInputStream(file);
    }
Opens a {@link FileInputStream} for the specified file, providing better error messages than simply calling
<code>new FileInputStream(file)</code>.
<p>
At the end of the method either the stream will be successfully opened, or an exception will have been thrown.
<p>
An exception is thrown if the file does not exist. An exception is thrown if the file object exists but is a
directory. An exception is thrown if the file exists but cannot be read.

@param file
@return
@throws IOException
fastexcel-core/src/main/java/cn/idev/excel/util/FileUtils.java