OlmStorage

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.ms.System.IDisposable, java.io.Closeable

public class OlmStorage implements System.IDisposable, Closeable

Represents Outlook for Mac storage (.OLM) file.

Constructors

Constructor Description
OlmStorage(TraversalExceptionsCallback callback) Initializes a new instance of the OlmStorage class.
OlmStorage(String fileName) Initializes a new instance of the OlmStorage class.
OlmStorage(InputStream stream) Initializes a new instance of the OlmStorage class.

Methods

Method Description
close()
dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
enumerateMessages(OlmFolder folder) Exposes the enumerator, which supports an iteration of messages in folder.
equals(Object arg0)
extractMapiMessage(OlmMessageInfo messageInfo) Get the message from OLM storage.
fromFile(String fileName) Load OLM storage from file.
fromStream(InputStream stream) Load OLM from stream.
getClass()
getFolder(String name, boolean ignoreCase) Gets the folder by name.
getFolderHierarchy() Gets the folder hierarchy.
getFolders() Gets collection of folders.
hashCode()
load(InputStream stream) Load OLM storage from stream.
load(String fileName) Load OLM storage from file.
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

OlmStorage(TraversalExceptionsCallback callback)

public OlmStorage(TraversalExceptionsCallback callback)

Initializes a new instance of the OlmStorage class. Allows setting a callback method for handling exceptions that occur during OLM storage traversal.

Parameters:

Parameter Type Description
callback TraversalExceptionsCallback The exception callback.

OlmStorage(String fileName)

public OlmStorage(String fileName)

Initializes a new instance of the OlmStorage class.

Parameters:

Parameter Type Description
fileName java.lang.String OLM file name.

OlmStorage(InputStream stream)

public OlmStorage(InputStream stream)

Initializes a new instance of the OlmStorage class.

Parameters:

Parameter Type Description
stream java.io.InputStream Source stream java.io.InputStream with OLM storage data.

close()

public void close()

dispose()

public final void dispose()

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

enumerateMessages(OlmFolder folder)

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

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

Parameters:

Parameter Type Description
folder OlmFolder OlmFolder that represents information about folder in OLM storage.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerable<com.aspose.email.MapiMessage> - System.Collections.Generic.IEnumerableltTgt , that represents an enumerator that iterates through a messages in folder.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

extractMapiMessage(OlmMessageInfo messageInfo)

public final MapiMessage extractMapiMessage(OlmMessageInfo messageInfo)

Get the message from OLM storage.

Parameters:

Parameter Type Description
messageInfo OlmMessageInfo An OlmMessageInfo object that represents information about message.

Returns: MapiMessage - A MapiMessage object.

fromFile(String fileName)

public static OlmStorage fromFile(String fileName)

Load OLM storage from file.

Parameters:

Parameter Type Description
fileName java.lang.String Name of .olm file.

Returns: OlmStorage - An OlmStorage object that represents the current OLM file.

fromStream(InputStream stream)

public static OlmStorage fromStream(InputStream stream)

Load OLM from stream.

Parameters:

Parameter Type Description
stream java.io.InputStream The System.IO.Stream.

Returns: OlmStorage - An OlmStorage object that represents the current OLM storage.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getFolder(String name, boolean ignoreCase)

public final OlmFolder getFolder(String name, boolean ignoreCase)

Gets the folder by name.

Parameters:

Parameter Type Description
name java.lang.String Name of folder.
ignoreCase boolean A value that indicates whether the name to match is case insensitive.

Returns: OlmFolder - An OlmFolder object.

getFolderHierarchy()

public final List<OlmFolder> getFolderHierarchy()

Gets the folder hierarchy.

Value: The folder hierarchy.

Returns: java.util.List<com.aspose.email.OlmFolder>

getFolders()

public final List<OlmFolder> getFolders()

Gets collection of folders.

Returns: java.util.List<com.aspose.email.OlmFolder> - The collection of folders that belong to the storage, i.e. the sub-folders of the current OLMStorage object.

hashCode()

public native int hashCode()

Returns: int

load(InputStream stream)

public final boolean load(InputStream stream)

Load OLM storage from stream. This method is used when a OlmStorage object is created using constructor with the TraversalExceptionsCallback parameter.

Parameters:

Parameter Type Description
stream java.io.InputStream The stream.

Returns: boolean - ’true’ if the file has been loaded successfully and further traversal is possible; otherwise, false.

load(String fileName)

public final boolean load(String fileName)

Load OLM storage from file. This method is used when a OlmStorage object is created using constructor with the TraversalExceptionsCallback parameter.

Parameters:

Parameter Type Description
fileName java.lang.String The file name.

Returns: boolean - ’true’ if the file has been loaded successfully and further traversal is possible; otherwise, false.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int