Package net.sourceforge.processdash.util

Examples of net.sourceforge.processdash.util.RobustFileWriter.abort()


            }

        } catch (IOException e) {
            logger.log(Level.SEVERE, "Encountered exception while writing to "
                    + datafile.file.getPath() + "; save aborted", e);
            try { rfw.abort(); } catch (Exception ex) {}
            return;
        }

        try {
            // Close output file
View Full Code Here


            saveSuccessful = true;
            System.err.println("Saved " + datafile.file.getPath());
        } catch (IOException e) {
            logger.log(Level.SEVERE, "Encountered exception while closing "
                    + datafile.file.getPath() + "; save aborted", e);
            try { rfw.abort(); } catch (Exception ex) {}
        }

      } finally {
          // if we couldn't successfully save the datafile, mark it as dirty.
          if (!saveSuccessful)              
View Full Code Here

    public void tryCancel() {
        RobustFileWriter ow = outWriter;
        if (ow != null) {
            try {
                ow.abort();
            } catch (Exception e) {}
        }
    }

    public void run() {
View Full Code Here

        if (checksum1 != checksum2) {
            // if the contents we just copied didn't match the first version of
            // the file we wrote, abort. This would only happen in the rare
            // circumstance when we wrote and verified one thing to the temp
            // file, then read it back differently.
            rout.abort();
            throw new IOException("Unable to save time log to file " + destFile);
        } else {
            rout.close();
            realTimeMods.clear();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.