Package com.nexirius.util

Examples of com.nexirius.util.XFile.writeText()


        }

        XFile settingsFile = new XFile(SETTINGS_FILENAME);

        try {
            settingsFile.writeText(settings.dragData());
        } catch (Exception e) {
            e.printStackTrace()//TODO
        }

        super.exit();
View Full Code Here


    //Method that defines that actual command and should return true if the transition
    //it could be mapped into should take place.
    public boolean execute(HTMLSessionVariable sessionVariable) throws Exception {
        XFile file = JnexExampleHtmlApplication.getTextFile();

        file.writeText(sessionVariable.getApplicationModel().dragData());
        return true;
    }
}
View Full Code Here

                String sID = new String(f.getBytes()); // reads the content of the file into a string
                id = Integer.parseInt(sID);
                ++id;
            }
            // write the latest id into file
            f.writeText(Integer.toString(id));

            return Integer.toString(id);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here

    public void create(DataModel model) {
        try {
            String id = getNewID();
            XFile dir = getDirectory(model.getClass());
            XFile file = new XFile(dir.getPath(), id);
            file.writeText(model.dragData());
            model.setInstanceName(id);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
View Full Code Here

     */
    public void update(DataModel model) {
        try {
            XFile dir = getDirectory(model.getClass());
            XFile file = new XFile(dir.getPath(), model.getInstanceName());
            file.writeText(model.dragData());
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
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.