Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean createUserFile(String username, String password){
- this.xmlContent = "<?xml version='1.0' encoding='UTF-8'?>\n" +
- "<giocatore>\n" +
- "<username>"+username+"</username>\n" +
- "<password>"+password+"</password>\n" +
- "</giocatore>";
- this.filename = "[D&D]User.xml";
- try{
- outputStream = context.openFileOutput(filename, context.MODE_PRIVATE);
- outputStream.write(xmlContent.getBytes());
- outputStream.close();
- System.out.println("----------------- File created -----------------");
- return true;
- } catch (IOException e) {
- e.printStackTrace();
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement