예제 #1
0
 private static synchronized void initialize() {
   if (list == null) {
     Editor.protect(MailboxProperties.class);
     list = new ArrayList<Entry>();
     File file = getFile();
     if (file.isFile()) {
       XMLReader xmlReader = Utilities.getDefaultXMLReader();
       if (xmlReader != null) {
         try {
           xmlReader.setContentHandler(new Handler());
           InputSource inputSource = new InputSource(file.getInputStream());
           xmlReader.parse(inputSource);
         } catch (Exception e) {
           Log.error(e);
         }
       }
     }
     // Delete old mailboxes.xml in ~/.j (if any).
     File oldFile = File.getInstance(Directories.getEditorDirectory(), "mailboxes.xml");
     if (oldFile != null && oldFile.isFile()) oldFile.delete();
   }
 }
 public final File getCurrentDirectory() {
   return Directories.getUserHomeDirectory();
 }
예제 #3
0
 private static final File getFile() {
   return File.getInstance(Directories.getMailDirectory(), "mailboxes.xml");
 }