All Packages This Package Class Hierarchy Class Search Index
Class grendel.storage.MailSummaryFileGrendel
java.lang.Object | +----grendel.storage.MailSummaryFile | +----grendel.storage.MailSummaryFileGrendel
This class knows how to read and write a mail folder summary file. This is a different format than that used by any previous version of Mozilla; it's similar to the 2.0/3.0 format, and totally unlike the 4.0/5.0 format.
class MailSummaryFileGrendel extends grendel.storage.MailSummaryFile { // Constructors 1 MailSummaryFileGrendel(BerkeleyFolder); // Methods 7 protected synchronized void getMessageCounts(); synchronized long readSummaryFile(InputStream) throws IOException; protected void salvageMessage(BerkeleyMessage, Object); synchronized void updateSummaryFile() throws IOException; boolean writable(); protected void writeSummaryData(OutputStream) throws IOException, SecurityException; void writeSummaryFile() throws IOException; }
Constructors
MailSummaryFileGrendel
MailSummaryFileGrendel(BerkeleyFolder folder)
Methods
readSummaryFile
synchronized long readSummaryFile(InputStream sum) throws IOException
Parses a Grendel (version 6) mail summary file, and adds the described messages to the associated Folder object.
- Overrides:
- readSummaryFile in class MailSummaryFile
salvageMessage
protected void salvageMessage(BerkeleyMessage m, Object salvage_object)
Assumes the salvage table contains Long values which are flags in X-Mozilla-Status form.
- Overrides:
- salvageMessage in class MailSummaryFile
getMessageCounts
protected synchronized void getMessageCounts()
Read only enough of the file to fill in the values of total_message_count, undeleted_message_count, unread_message_count, and deleted_message_bytes.
- Overrides:
- getMessageCounts in class MailSummaryFile
writable
boolean writable()
Returns true, since this class implements writeSummaryFile().
- Overrides:
- writable in class MailSummaryFile
writeSummaryFile
void writeSummaryFile() throws IOException
Write a summary file for the associated folder, in the Grendel format (version 6.)
- Overrides:
- writeSummaryFile in class MailSummaryFile
writeSummaryData
protected void writeSummaryData(OutputStream out) throws IOException, SecurityException
updateSummaryFile
synchronized void updateSummaryFile() throws IOException
Called when the folder's disk file has been appended to by this program. (As opposed to, an unexpected, unknown change by some other program.) This overwrites certain fields in a Grendel-format summary file. Those fields are:
- FOLDER_SIZE
- FOLDER_DATE
- NMSGS
- NVALIDMSGS
- NUNREADMSGS
- DELETED_BYTES
- Overrides:
- updateSummaryFile in class MailSummaryFile
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4