Package net.sourceforge.processdash.tool.export.mgr

Examples of net.sourceforge.processdash.tool.export.mgr.ExternalResourceManager


        result.deleteOnExit();
        ZipOutputStream zipOut = new ZipOutputStream(new BufferedOutputStream(
                new FileOutputStream(result)));
        zipOut.setLevel(9);
       
        ExternalResourceManager extMgr = ExternalResourceManager.getInstance();

        // copy all the files from the existing backup into the externalized
        // backup (but skip any files that appear to be externalized)
        ZipEntry e;
        while ((e = zipIn.getNextEntry()) != null) {
            String filename = e.getName();
            if (extMgr.isArchivedItem(filename))
                continue;

            ZipEntry eOut = new ZipEntry(filename);
            eOut.setTime(e.getTime());
            zipOut.putNextEntry(eOut);
            FileUtils.copyFile(zipIn, zipOut);
            zipOut.closeEntry();           
        }
        zipIn.close();
       
        // now, ask the external resource manager to augment the ZIP.
        extMgr.addExternalResourcesToBackup(zipOut);
        zipOut.finish();
        zipOut.close();
       
        return result;
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.tool.export.mgr.ExternalResourceManager

Copyright © 2018 www.massapicom. 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.