public static void save ( final File file , final Dependencies dependencies ) { Utils4J . checkNotNull ( "file" , file ) ; Utils4J . checkValidFile ( file ) ; final XStream xstream = createXStream ( ) ; try { final Writer writer = new FileWriter ( file ) ; try { xstream . toXML ( dependencies , writer ) ; } finally { writer . close ( ) ; } } catch ( final IOException ex ) { throw new RuntimeException ( ex ) ; } }
Write the dependencies to a file .