@SuppressWarnings("unchecked") public T read(URL file){
  Preconditions.checkNotNull(file);
  try (InputStream stream=file.openStream()){
    return (T)yamlParser.load(stream);
  }
 catch (  IOException e) {
    throw new RuntimeException("Could not load config file: " + file.getFile(),e);
  }
}

@ SuppressWarnings ( "unchecked" ) public T read ( URL file ) { Preconditions . checkNotNull ( file ) ; try ( InputStream stream = file . openStream ( ) ) { return ( T ) yamlParser . load ( stream ) ; } catch ( IOException e ) { throw new RuntimeException ( "Could not load config file: " + file . getFile ( ) , e ) ; } }
read a yaml file from a url
