Changeset 382

Show
Ignore:
Timestamp:
07/26/10 01:54:18 (2 years ago)
Author:
ke
Message:

Small persistence bugfixes. Next up: major persistence bugfixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • kahina/trunk/src/org/kahina/core/KahinaInstance.java

    r381 r382  
    221221                                monitor.increment(); 
    222222                        } 
     223                        out.flush(); 
    223224                        FileUtilities.zipDirectory(directory, zipFile, monitor); 
    224225                        FileUtilities.deleteRecursively(directory); 
  • kahina/trunk/src/org/kahina/core/io/magazine/ObjectMagazine.java

    r381 r382  
    173173        { 
    174174                Properties properties = readPropertiesFile(folder); 
    175                 return new ObjectMagazine<S>(folder, Integer.parseInt(properties.getProperty("blockSize")), Long.parseLong(properties.getProperty("lowerBound")), Long.parseLong(properties 
     175                return new ObjectMagazine<S>(folder, Integer.parseInt(properties.getProperty("blockSize")), Float.parseFloat(properties.getProperty("lowerBound")), Float.parseFloat(properties 
    176176                                .getProperty("upperBound")), folder.list().length); 
    177177        } 
  • kahina/trunk/src/org/kahina/core/util/FileUtilities.java

    r381 r382  
    2121        public static void copy(File source, File destination) throws IOException 
    2222        { 
    23                 OutputStream out = null
     23                OutputStream out = new BufferedOutputStream(new FileOutputStream(destination))
    2424                try 
    2525                { 
    26                         out = new BufferedOutputStream(new FileOutputStream(destination)); 
    2726                        copy(source, out); 
    2827                } catch (IOException e) 
     
    3837        } 
    3938 
    40         private static void copy(File sourcee, OutputStream out) throws IOException 
     39        private static void copy(File source, OutputStream out) throws IOException 
    4140        { 
    42                 InputStream in = new BufferedInputStream(new FileInputStream(sourcee)); 
     41                InputStream in = new BufferedInputStream(new FileInputStream(source)); 
    4342                try 
    4443                { 
     
    125124                        out.putNextEntry(new ZipEntry(toZip.getCanonicalPath().substring(rootPathLength))); 
    126125                        copy(toZip, out); 
     126                        out.closeEntry(); 
    127127                } 
    128128        }