public final class MboxrdStorageReader extends MboxStorageReader
Represents mboxrd format storage reader, this format is being used by Thunderbird, Eudora OSE and other mail clients.
Constructor and Description |
---|
MboxrdStorageReader(InputStream stream,
boolean leaveOpen)
Initializes a new instance of the
MboxrdStorageReader class. |
MboxrdStorageReader(String fileName,
boolean leaveOpen)
Initializes a new instance of the
MboxrdStorageReader class. |
Modifier and Type | Method and Description |
---|---|
int |
getTotalItemsCount()
Returns the number of messages in a storage.
|
MailMessage |
readNextMessage()
Reads the next message from underlying storage stream.
|
MailMessage |
readNextMessage(String[] fromMarker)
Reads the next message from underlying storage stream.
|
dispose, dispose, getBaseStream, getCurrentDataSize, setCurrentDataSize
public MboxrdStorageReader(InputStream stream, boolean leaveOpen)
Initializes a new instance of the MboxrdStorageReader
class.
stream
- The stream.leaveOpen
- if set to true
leaves the underlying stream open after disposing.ArgumentNullException
- If given stream is null.public MboxrdStorageReader(String fileName, boolean leaveOpen)
Initializes a new instance of the MboxrdStorageReader
class.
fileName
- Name of the file.leaveOpen
- if set to true
leaves the underlying stream open after disposing.ArgumentNullException
- If filename is null or empty.public MailMessage readNextMessage(String[] fromMarker)
Reads the next message from underlying storage stream.
readNextMessage
in class MboxStorageReader
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 MailMessage readNextMessage()
Reads the next message from underlying storage stream.
readNextMessage
in class MboxStorageReader
MailMessage
object if it can be read or <b>null</b>
if no more messages are available.public final int getTotalItemsCount()
Returns the number of messages in a storage.