com.aspose.email
Class MboxStorageWriter

java.lang.Object
  extended by com.aspose.email.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, boolean leaveOpen)
           
MboxStorageWriter(String fileName, boolean leaveOpen)
           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 flush()
           
 InputStream getBaseStream()
           
abstract  void writeMessage(MailMessage message)
           Writes the message to underlying storage stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

getBaseStream

public InputStream getBaseStream()

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()


Copyright (c) 2008-2012 Aspose Pty Ltd. All Rights Reserved.