|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecti2p.susi.webmail.PersistentMailCache
class PersistentMailCache
Manage the on-disk cache. This is a custom format with subdirectories, gzipped files, and the encoded UIDL in the file name. We store either the headers or the full message. No, it is not Maildir format but we could add Maildir-style status suffixes (e.g. ":2.SR") later. Exporting to a Maildir format would be just ungzipping each file to a flat directory. TODO draft and sent folders, cached server caps and config.
Constructor Summary | |
---|---|
PersistentMailCache(String host,
int port,
String user,
String pass)
Use the params to generate a unique directory name. |
Method Summary | |
---|---|
void |
deleteMail(Mail mail)
Delete data from disk. |
void |
deleteMail(String uidl)
Delete data from disk. |
boolean |
getMail(Mail mail,
boolean headerOnly)
Fetch any needed data from disk. |
Collection<Mail> |
getMails()
Fetch all mails from disk. |
boolean |
saveMail(Mail mail)
Save data to disk. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistentMailCache(String host, int port, String user, String pass) throws IOException
pass
- ignored
IOException
Method Detail |
---|
public Collection<Mail> getMails()
public boolean getMail(Mail mail, boolean headerOnly)
public boolean saveMail(Mail mail)
public void deleteMail(Mail mail)
public void deleteMail(String uidl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |