com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MboxStorageWriter

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable
    Direct Known Subclasses:
    MboxrdStorageWriter


    public abstract class MboxStorageWriter
    extends Object
    implements com.aspose.ms.System.IDisposable

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

    • Constructor Detail

      • MboxStorageWriter

        protected MboxStorageWriter(OutputStream stream,
                         boolean leaveOpen)

        Initializes a new instance of the MboxStorageWriter class.

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

        protected 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.ms.System.ArgumentNullException - 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.
      • writeMessage

        public abstract void writeMessage(MailMessage message,
                        String[] fromMarker)

        Writes the message to underlying storage stream.

        Parameters:
        message - The message to write to.
        fromMarker - Gets the From Marker while writing the MBox Storage file.
      • dispose

        public void dispose()

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

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

        protected void dispose(boolean disposing)

        Releases unmanaged and - optionally - managed resources

        Parameters:
        disposing - true to release both managed and unmanaged resources; false to release only unmanaged resources.
      • flush

        public void flush()

        flush.