private static ArrayList < URL > getUrls ( File [ ] files ) { final ArrayList < URL > urls = new ArrayList <> ( ) ; for ( File file : files ) { try { final URL url = file . toURI ( ) . toURL ( ) ; urls . add ( url ) ; } catch ( final MalformedURLException e ) { logger . error ( "File is not convertible to URL." , e ) ; } } return urls ; }
Convert a list of files to a list of files URLs