public abstract class MboxStorageWriter extends Object implements com.aspose.email.ms.System.IDisposable
A base class for any mbox-based mail storage writer.
Constructor and Description |
---|
MboxStorageWriter(OutputStream stream,
boolean leaveOpen) |
MboxStorageWriter(String fileName,
boolean leaveOpen)
Initializes a new instance of the
MboxStorageWriter class. |
Modifier and Type | Method and Description |
---|---|
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.
|
public MboxStorageWriter(OutputStream stream, boolean leaveOpen)
public MboxStorageWriter(String fileName, boolean leaveOpen)
Initializes a new instance of the MboxStorageWriter
class.
fileName
- Name of the file.leaveOpen
- if set to true
leaves the underlying stream open after disposing.com.aspose.email.ms.System.IllegalArgumentException
- If filename is null or empty.public InputStream getBaseStream()
public abstract void writeMessage(MailMessage message)
Writes the message to underlying storage stream.
message
- The message to write to.public void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.email.ms.System.IDisposable
public void flush()
Copyright (c) 2008-2013 Aspose Pty Ltd. All Rights Reserved.