class PersistentMailCache extends Object
Modifier and Type | Field | Description |
---|---|---|
static String |
DIR_ATTACHMENTS |
|
static String |
DIR_IMPORT |
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.
|
File |
getAttachmentDir() |
|
GzipFileBuffer |
getFullBuffer(String uidl) |
For reading or writing a new full mail (NOT headers only).
|
File |
getFullFile(String uidl) |
|
File |
getHeaderFile(String uidl) |
|
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_IMPORT
public static final String DIR_ATTACHMENTS
public PersistentMailCache(I2PAppContext ctx, String host, int port, String user, String pass, String folder) throws IOException
pass
- ignoredfolder
- e.g. 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)
public GzipFileBuffer getFullBuffer(String uidl)
public File getAttachmentDir()