class PersistentMailCache extends Object
| Modifier and Type | Field and Description |
|---|---|
static String | DIR_ATTACHMENTSDIR_ATTACHMENTS. |
static String | DIR_IMPORTDIR_IMPORT. |
| Constructor and 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 and 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_ATTACHMENTS
public static final String DIR_IMPORT
public PersistentMailCache(I2PAppContext ctx, String host, int port, String user, String pass, String folder) throws IOException
pass - ignoredfolder - e.g. DIR_FOLDERIOExceptionpublic void deleteMail(Mail mail)
public void deleteMail(String uidl)
public File getAttachmentDir()
public GzipFileBuffer getFullBuffer(String uidl)
public boolean getMail(Mail mail, boolean headerOnly)
public Collection<Mail> getMails()
public boolean saveMail(Mail mail)