public static void saveBin ( DMatrix A , String fileName ) throws IOException { FileOutputStream fileStream = new FileOutputStream ( fileName ) ; ObjectOutputStream stream = new ObjectOutputStream ( fileStream ) ; try { stream . writeObject ( A ) ; stream . flush ( ) ; } finally { // clean up try { stream . close ( ) ; } finally { fileStream . close ( ) ; } } }
Saves a matrix to disk using Java binary serialization .