public static InputStream inputStream(File file) {
        // workaround http://stackoverflow.com/questions/36880692/java-file-does-not-exists-but-file-getabsolutefile-exists
        if (!file.exists()) {
            file = file.getAbsoluteFile();
        }
        if (!file.exists()) {
            throw E.ioException("File does not exists: %s", file.getPath());
        }
        try {
            return new FileInputStream(file);
        } catch (FileNotFoundException e) {
            throw E.ioException(e);
        }
    }
public static InputStream inputStream ( File file ) { if ( ! file . exists ( ) ) { file = file . getAbsoluteFile ( ) ; } if ( ! file . exists ( ) ) { throw E . ioException ( "File does not exists: %s" , file . getPath ( ) ) ; } try { return new FileInputStream ( file ) ; } catch ( FileNotFoundException e ) { throw E . ioException ( e ) ; } }
Returns a file input stream

@param file
the file to be read
@return inputstream that read the file