class PersistentMailCache extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DIR_ATTACHMENTS |
static String |
DIR_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.
|
static List<String> |
getAllUsers(String host,
int port) |
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 static List<String> getAllUsers(String host, int port)
public GzipFileBuffer getFullBuffer(String uidl)
public File getAttachmentDir()