com.aspose.network
Class MboxStorageWriter

java.lang.Object
  extended by com.aspose.network.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 Summary
MboxStorageWriter(OutputStream stream, 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.
 OutputStream getBaseStream()
           Gets the base stream.
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)

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:
ArgumentNullException - If given stream is null.
Method Detail

getBaseStream

public OutputStream getBaseStream()

Gets the base stream.

Value: The base stream.


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.ms.System.IDisposable


Copyright (c) 2002-2011 Aspose Pty Ltd. All Rights Reserved.