Package org.openstreetmap.josm.io.session

Examples of org.openstreetmap.josm.io.session.SessionReader


        @Override
        protected void realRun() {
            try {
                ProgressMonitor monitor = getProgressMonitor();
                SessionReader reader = new SessionReader();
                boolean tempFile = false;
                try {
                    if (file == null) {
                        // Download and write entire joz file as a temp file on disk as we need random access later
                        file = File.createTempFile("session_", ".joz", Utils.getJosmTempDir());
                        tempFile = true;
                        try (FileOutputStream out = new FileOutputStream(file)) {
                            Utils.copyStream(is, out);
                        }
                    }
                    reader.loadSession(file, zip, monitor);
                    layers = reader.getLayers();
                    active = reader.getActive();
                    postLoadTasks = reader.getPostLoadTasks();
                    viewport = reader.getViewport();
                } finally {
                    if (tempFile) {
                        if (!file.delete()) {
                            file.deleteOnExit();
                        }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.io.session.SessionReader

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.