use of i2p.bote.email.EmailMetadata in project i2p.i2p-bote by i2p.
the class EmailFolder method setRecent.
public void setRecent(String messageId, boolean isRecent) throws PasswordException, GeneralSecurityException {
EmailMetadata metadata = getMetadata(messageId);
metadata.setRecent(isRecent);
try {
saveMetadata(metadata, getMetadataFile(messageId));
} catch (IOException e) {
log.error("Can't read metadata file for message ID <" + messageId + ">", e);
}
}
use of i2p.bote.email.EmailMetadata in project i2p.i2p-bote by i2p.
the class EmailFolder method setNew.
/**
* Flags an email "new" (if <code>isNew</code> is <code>true</code>) or
* "old" (if <code>isNew</code> is <code>false</code>).
* @param messageId
* @param isNew
* @throws GeneralSecurityException
* @throws PasswordException
*/
public void setNew(String messageId, boolean isNew) throws PasswordException, GeneralSecurityException {
EmailMetadata metadata = getMetadata(messageId);
metadata.setUnread(isNew);
try {
saveMetadata(metadata, getMetadataFile(messageId));
} catch (IOException e) {
log.error("Can't read metadata file for message ID <" + messageId + ">", e);
}
}
use of i2p.bote.email.EmailMetadata in project i2p.i2p-bote by i2p.
the class EmailFolder method getMetadata.
private EmailMetadata getMetadata(File file) throws IOException, GeneralSecurityException, PasswordException {
InputStream metadataStream = new BufferedInputStream(new EncryptedInputStream(new FileInputStream(file), passwordHolder));
EmailMetadata metadata = new EmailMetadata(metadataStream);
return metadata;
}
Aggregations