db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Meany <dan_me...@yahoo.com>
Subject 0 byte out for DatabaseIO and fix
Date Mon, 29 Aug 2005 18:48:25 GMT
Using a small test schema, without the flush() i added
to DatabaseIO.java below, i always get 0 byte file
output. i also added a close.
(Contribution)

public void write(Database model, String filename)
throws DdlUtilsException
{
   try {
     FileWriter filewriter = new FileWriter(filename);
     try {
         BeanWriter beanwriter = getWriter(new
BufferedWriter(filewriter));
         beanwriter.write(model);
         beanwriter.flush();
     } finally {
         filewriter.close();
     }
   } catch (Exception ex) {
     throw new DdlUtilsException(ex);
   }
}

Mime
View raw message