Examples of importFromStream()


Examples of eu.planets_project.pp.plato.xml.LibraryExport.importFromStream()

       
        LibraryExport export = new LibraryExport();
        File exported = new File ("test-data/lib_export.xml");
        export.exportToStream(lib, new FileOutputStream(exported));
       
        lib = export.importFromStream(new FileInputStream(exported));
        File reExported = new File(exported + "_out.xml");
        export.exportToStream(lib, new FileOutputStream(reExported));
       
        if (Arrays.equals(FileUtils.getBytesFromFile(exported), FileUtils.getBytesFromFile(reExported))) {
            // they are equal, remove the exported plan
View Full Code Here

Examples of eu.planets_project.pp.plato.xml.LibraryExport.importFromStream()

        }
       
        LibraryExport imp = new LibraryExport();
       
        try {
            LibraryTree newLib = imp.importFromStream(new ByteArrayInputStream(file));
            // at the moment we only support one Library definition
            newLib.setName("mainlibrary");
           
            // delete existing library
            LibraryTree oldLib = null;
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.