com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MboxrdStorageReader

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable


    public final class MboxrdStorageReader
    extends MboxStorageReader

    Represents mboxrd format storage reader, this format is being used by Thunderbird, Eudora OSE and other mail clients.

    • Constructor Detail

      • MboxrdStorageReader

        public MboxrdStorageReader(InputStream stream,
                           boolean leaveOpen)

        Initializes a new instance of the MboxrdStorageReader class.

        Parameters:
        stream - The stream.
        leaveOpen - if set to true leaves the underlying stream open after disposing.
        Throws:
        ArgumentNullException - If given stream is null.
      • MboxrdStorageReader

        public MboxrdStorageReader(String fileName,
                           boolean leaveOpen)

        Initializes a new instance of the MboxrdStorageReader class.

        Parameters:
        fileName - Name of the file.
        leaveOpen - if set to true leaves the underlying stream open after disposing.
        Throws:
        ArgumentNullException - If filename is null or empty.
    • Method Detail

      • readNextMessage

        public MailMessage readNextMessage(String[] fromMarker)

        Reads the next message from underlying storage stream.

        Specified by:
        readNextMessage in class MboxStorageReader
        Parameters:
        fromMarker - Gets the From Marker while parsing the MBox Storage file.
        Returns:
        A MailMessage object if it can be read or <b>null</b> if no more messages are available.
      • getTotalItemsCount

        public final int getTotalItemsCount()

        Returns the number of messages in a storage.

        Returns:
        Returns the number of messages in a storage.