com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class OlmStorage

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable


    public class OlmStorage
    extends Object
    implements com.aspose.ms.System.IDisposable

    Represents Outlook for Mac storage (.OLM) file.

    • Constructor Detail

      • OlmStorage

        public OlmStorage(String fileName)

        Initializes a new instance of the OlmStorage class.

        Parameters:
        fileName - OLM file name.
        Throws:
        com.aspose.ms.System.ArgumentNullException - throws if file name is null or empty
      • OlmStorage

        public OlmStorage(InputStream stream)

        Initializes a new instance of the OlmStorage class.

        Parameters:
        stream - Source stream InputOutputStream with OLM storage data.
        Throws:
        com.aspose.ms.System.ArgumentNullException - throws if stream is null
    • Method Detail

      • getFolderHierarchy

        public final List<OlmFolder> getFolderHierarchy()

        Gets the folder hierarchy.

        Value: The folder hierarchy.
      • fromFile

        public static OlmStorage fromFile(String fileName)

        Load OLM storage from file.

        Parameters:
        fileName - Name of .olm file.
        Returns:
        An OlmStorage object that represents the current OLM file.
      • fromStream

        public static OlmStorage fromStream(InputStream stream)

        Load OLM from stream.

        Parameters:
        stream - The System.IO.Stream.
        Returns:
        An OlmStorage object that represents the current OLM storage.
      • getFolders

        public final List<OlmFolder> getFolders()

        Gets collection of folders.

        Returns:
        The collection of folders that belong to the storage, i.e. the sub-folders of the current OLMStorage object.
      • getFolder

        public final OlmFolder getFolder(String name,
                          boolean ignoreCase)

        Gets the folder by name.

        Parameters:
        name - Name of folder.
        ignoreCase - A value that indicates whether the name to match is case insensitive.
        Returns:
        An OlmFolder object.
      • extractMapiMessage

        public final MapiMessage extractMapiMessage(OlmMessageInfo messageInfo)

        Get the message from OLM storage.

        Parameters:
        messageInfo - An OlmMessageInfo object that represents information about message.
        Returns:
        A MapiMessage object.
      • enumerateMessages

        public final com.aspose.ms.System.Collections.Generic.IGenericEnumerable<MapiMessage> enumerateMessages(OlmFolder folder)

        Exposes the enumerator, which supports an iteration of messages in folder.

        Parameters:
        folder - OlmFolder that represents information about folder in OLM storage.
        Returns:
        System.Collections.Generic.IEnumerableltTgt, that represents an enumerator that iterates through a messages in folder.
        Throws:
        com.aspose.ms.System.ArgumentNullException - throws if folder is null
      • dispose

        public final void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
      • dispose

        protected void dispose(boolean disposing)

        Releases unmanaged and - optionally - managed resources.

        Parameters:
        disposing - true to release both managed and unmanaged resources; false to release only unmanaged resources.