com.aspose.email

com.aspose.email

Class MboxStorageWriter

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

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

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

    • Constructor Detail

      • MboxStorageWriter

        public MboxStorageWriter(OutputStream stream,
                                 boolean leaveOpen)
      • MboxStorageWriter

        public MboxStorageWriter(String fileName,
                                 boolean leaveOpen)

        Initializes a new instance of the MboxStorageWriter 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

      • writeMessage

        public abstract void writeMessage(MailMessage message)

        Writes the message to underlying storage stream.

        Parameters:
        message - The message to write to.
      • 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
      • flush

        public void flush()