question: public static void writeFile ( File file , byte [ ] data ) { try { RandomAccessFile ra = new RandomAccessFile ( file , "rw" ) ; ra . write ( data ) ; ra . setLength ( data . length ) ; ra . close ( ) ; } catch ( IOException e ) { throw new RuntimeException ( "Error writing to file " + file , e ) ; } }
target:  Create or overwrite a file.