com.aspose.email

com.aspose.email

Class MboxStorageReader

All Implemented Interfaces:
com.aspose.email.ms.System.IDisposable
Direct Known Subclasses:
MboxrdStorageReader
public abstract class MboxStorageReader
extends Object
implements com.aspose.email.ms.System.IDisposable

A base class for any mbox-based mail storage reader.

Constructor Summary
MboxStorageReader(InputStream stream, booleanleaveOpen)
MboxStorageReader(String fileName, booleanleaveOpen)
Initializes a new instance of the MboxStorageReader class.
 
Method Summary
void
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
abstract MailMessage
readNextMessage()
Reads the next message from underlying storage stream.
 
Methods inherited from class java.lang.Object
 

    • Constructor Detail

      • MboxStorageReader

        public MboxStorageReader(InputStream stream,
                                 boolean leaveOpen)
      • MboxStorageReader

        public MboxStorageReader(String fileName,
                                 boolean leaveOpen)

        Initializes a new instance of the MboxStorageReader class.

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

      • readNextMessage

        public abstract MailMessage readNextMessage()

        Reads the next message from underlying storage stream.

        Returns:
        A MailMessage object if it can be read or null if no more messages are available.
      • dispose

        public void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.email.ms.System.IDisposable