public static void write ( byte [ ] data , File file ) { OutputStream os = null ; try { os = new FileOutputStream ( file ) ; os . write ( data ) ; os . flush ( ) ; } catch ( IOException e ) { throw new UnexpectedException ( e ) ; } finally { try { if ( os != null ) os . close ( ) ; } catch ( Exception e ) { // } } }
Write binay data to a file