public abstract class MboxStorageWriter extends Object implements com.aspose.ms.System.IDisposable, Closeable
A base class for any mbox-based mail storage writer.
| Modifier | Constructor and Description |
|---|---|
protected |
MboxStorageWriter(OutputStream stream,
boolean leaveOpen)
Initializes a new instance of the
MboxStorageWriter class. |
protected |
MboxStorageWriter(com.aspose.ms.System.IO.Stream stream,
boolean leaveOpen)
Initializes a new instance of the
MboxStorageWriter class. |
protected |
MboxStorageWriter(String fileName,
boolean leaveOpen)
Initializes a new instance of the
MboxStorageWriter class. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources
|
void |
flush()
flush.
|
InputStream |
getBaseStream()
Deprecated.
|
abstract void |
writeMessage(MailMessage message)
Writes the message to underlying storage stream.
|
abstract void |
writeMessage(MailMessage message,
String[] fromMarker)
Writes the message to underlying storage stream.
|
protected MboxStorageWriter(OutputStream stream, boolean leaveOpen)
Initializes a new instance of the MboxStorageWriter class.
stream - The stream.leaveOpen - if set to true leaves the underlying stream open after disposing.com.aspose.ms.System.ArgumentNullException - If given stream is null.protected MboxStorageWriter(com.aspose.ms.System.IO.Stream stream,
boolean leaveOpen)
Initializes a new instance of the MboxStorageWriter class.
stream - The stream.leaveOpen - if set to true leaves the underlying stream open after disposing.com.aspose.ms.System.ArgumentNullException - If given stream is null.protected 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.ms.System.ArgumentNullException - If filename is null or empty.@Deprecated public InputStream getBaseStream()
Gets the base stream.
Value: The base stream.public abstract void writeMessage(MailMessage message)
Writes the message to underlying storage stream.
message - The message to write to.public abstract void writeMessage(MailMessage message, String[] fromMarker)
Writes the message to underlying storage stream.
message - The message to write to.fromMarker - Gets the From Marker while writing the MBox Storage file.public final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose in interface com.aspose.ms.System.IDisposablepublic void close()
close in interface Closeableclose in interface AutoCloseableprotected void dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources
disposing - true to release both managed and unmanaged resources; false to release only unmanaged resources.public void flush()
flush.
Copyright (c) 2008-2021 Aspose Pty Ltd. All Rights Reserved.