public static Source fromFile(File f,Charset cs) throws IOException {
  try (InputStream is=new FileInputStream(f)){
    return fromStream(is,f.toURI(),cs);
  }
 }

public static Source fromFile ( File f , Charset cs ) throws IOException { try ( InputStream is = new FileInputStream ( f ) ) { return fromStream ( is , f . toURI ( ) , cs ) ; } }
creates a new source object from a file
