public abstract class MboxStorageReader extends Object implements com.aspose.ms.System.IDisposable
A base class for any mbox-based mail storage reader.
Modifier | Constructor and Description |
---|---|
protected |
MboxStorageReader(InputStream stream,
boolean leaveOpen)
Initializes a new instance of the
MboxStorageReader class. |
protected |
MboxStorageReader(String fileName,
boolean leaveOpen)
Initializes a new instance of the
MboxStorageReader class. |
Modifier and Type | Method and Description |
---|---|
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
|
InputStream |
getBaseStream()
Deprecated.
|
long |
getCurrentDataSize()
Gets the number of bytes that is read by ReadNextMessage method.
|
abstract MailMessage |
readNextMessage()
Reads the next message from underlying storage stream.
|
abstract MailMessage |
readNextMessage(String[] fromMarker)
Reads the next message from underlying storage stream.
|
protected void |
setCurrentDataSize(long value)
Gets the number of bytes that is read by ReadNextMessage method.
|
protected MboxStorageReader(InputStream stream, boolean leaveOpen)
Initializes a new instance of the MboxStorageReader
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 MboxStorageReader(String fileName, boolean leaveOpen)
Initializes a new instance of the MboxStorageReader
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 final long getCurrentDataSize()
Gets the number of bytes that is read by ReadNextMessage method.
protected final void setCurrentDataSize(long value)
Gets the number of bytes that is read by ReadNextMessage method.
public abstract MailMessage readNextMessage()
Reads the next message from underlying storage stream.
MailMessage
object if it can be read or <b>null</b>
if no more messages are available.public abstract MailMessage readNextMessage(String[] fromMarker)
Reads the next message from underlying storage stream.
fromMarker
- Gets the From Marker while parsing the MBox Storage file.MailMessage
object if it can be read or <b>null</b>
if no more messages are available.public final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable
protected 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.