From: Steve L. <st...@us...> - 2006-05-02 16:37:38
|
Update of /cvsroot/smartfrog/core/components/deployapi/src/org/smartfrog/services/deployapi/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29885/components/deployapi/src/org/smartfrog/services/deployapi/system Modified Files: Utils.java Log Message: AddFile; some statistics collection (not routed to anything yet) Index: Utils.java =================================================================== RCS file: /cvsroot/smartfrog/core/components/deployapi/src/org/smartfrog/services/deployapi/system/Utils.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Utils.java 24 Apr 2006 14:53:11 -0000 1.19 --- Utils.java 2 May 2006 16:37:34 -0000 1.20 *************** *** 82,86 **** public static void close(Closeable stream) { try { ! stream.close(); } catch (IOException e) { //ignore --- 82,88 ---- public static void close(Closeable stream) { try { ! if(stream!=null) { ! stream.close(); ! } } catch (IOException e) { //ignore *************** *** 105,108 **** --- 107,120 ---- } + public static void saveToBinaryFile(File dest, byte[] data) throws IOException { + FileOutputStream out = null; + try { + out = new FileOutputStream(dest); + out.write(data); + } finally { + close(out); + } + } + /** * Load a file with a given charset into a buffer |