public static Optional<String> readToken(File dir,String name) throws IOException {
  File token=new File(dir,name);
  if (!token.isFile()) {
    return Optional.empty();
  }
 else {
    return Optional.of(FileUtils.readFileToString(token,StandardCharsets.UTF_8));
  }
}

public static Optional < String > readToken ( File dir , String name ) throws IOException { File token = new File ( dir , name ) ; if ( ! token . isFile ( ) ) { return Optional . empty ( ) ; } else { return Optional . of ( FileUtils . readFileToString ( token , StandardCharsets . UTF_8 ) ) ; } }
returns the contents of a file with the given name , if it exists .
