class PersistentMailCache extends Object
Modifier and Type | Field | Description |
---|---|---|
static String |
DIR_DRAFTS |
|
static String |
DIR_FOLDER |
|
static String |
DIR_IMPORT |
|
static String |
DIR_SENT |
|
static String |
DIR_SPAM |
|
static String |
DIR_TRASH |
Constructor | Description |
---|---|
PersistentMailCache(I2PAppContext ctx,
String host,
int port,
String user,
String pass,
String folder) |
Use the params to generate a unique directory name.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
public static final String DIR_FOLDER
public static final String DIR_DRAFTS
public static final String DIR_SENT
public static final String DIR_TRASH
public static final String DIR_SPAM
public static final String DIR_IMPORT
public PersistentMailCache(I2PAppContext ctx, String host, int port, String user, String pass, String folder) throws IOException
pass
- ignoredfolder
- use DIR_FOLDERIOException
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)