public class OlmStorage extends Object implements com.aspose.ms.System.IDisposable, Closeable
Represents Outlook for Mac storage (.OLM) file.
Constructor and Description |
---|
OlmStorage(InputStream stream)
Initializes a new instance of the
OlmStorage class. |
OlmStorage(String fileName)
Initializes a new instance of the
OlmStorage 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.
|
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<MapiMessage> |
enumerateMessages(OlmFolder folder)
Exposes the enumerator, which supports an iteration of messages in folder.
|
MapiMessage |
extractMapiMessage(OlmMessageInfo messageInfo)
Get the message from OLM storage.
|
static OlmStorage |
fromFile(String fileName)
Load OLM storage from file.
|
static OlmStorage |
fromStream(InputStream stream)
Load OLM from stream.
|
OlmFolder |
getFolder(String name,
boolean ignoreCase)
Gets the folder by name.
|
List<OlmFolder> |
getFolderHierarchy()
Gets the folder hierarchy.
|
List<OlmFolder> |
getFolders()
Gets collection of folders.
|
public OlmStorage(String fileName)
Initializes a new instance of the OlmStorage
class.
fileName
- OLM file name.com.aspose.ms.System.ArgumentNullException
- throws if file name is null or emptypublic OlmStorage(InputStream stream)
Initializes a new instance of the OlmStorage
class.
stream
- Source stream InputOutputStream
with OLM storage data.com.aspose.ms.System.ArgumentNullException
- throws if stream is nullpublic final List<OlmFolder> getFolderHierarchy()
Gets the folder hierarchy.
Value: The folder hierarchy.public static OlmStorage fromFile(String fileName)
Load OLM storage from file.
fileName
- Name of .olm file.public static OlmStorage fromStream(InputStream stream)
Load OLM from stream.
stream
- The System.IO.Stream.public final List<OlmFolder> getFolders()
Gets collection of folders.
public final OlmFolder getFolder(String name, boolean ignoreCase)
Gets the folder by name.
name
- Name of folder.ignoreCase
- A value that indicates whether the name to match is case insensitive.public final MapiMessage extractMapiMessage(OlmMessageInfo messageInfo)
Get the message from OLM storage.
messageInfo
- An OlmMessageInfo object that
represents information about message.public final com.aspose.ms.System.Collections.Generic.IGenericEnumerable<MapiMessage> enumerateMessages(OlmFolder folder)
Exposes the enumerator, which supports an iteration of messages in folder.
folder
- OlmFolder
that represents information about folder in OLM storage.System.Collections.Generic.IEnumerableltTgt
,
that represents an enumerator that iterates through a messages in folder.com.aspose.ms.System.ArgumentNullException
- throws if folder is nullpublic final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable
public void close()
close
in interface Closeable
close
in interface AutoCloseable
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.Copyright (c) 2008-2020 Aspose Pty Ltd. All Rights Reserved.