PersonalStorage.FromStream
Contents
[
Hide
]FromStream(Stream, bool)
Opens a PST or OST from a stream.
public static PersonalStorage FromStream(Stream stream, bool writable)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The stream with the PST or OST data. |
| writable | Boolean | true to open the PST for reading and writing; false for reading only. |
Return Value
The opened storage.
Remarks
The stream is closed when the storage is disposed. To keep it open, use the overload with PersonalStorageLoadOptions and set its LeaveStreamOpen property.
See Also
- class PersonalStorage
- namespace Aspose.Email.Storage.Pst
- assembly Aspose.Email
FromStream(Stream, PersonalStorageLoadOptions)
Opens a PST or OST from a stream with the specified options.
public static PersonalStorage FromStream(Stream stream, PersonalStorageLoadOptions loadOptions)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The stream with the PST or OST data. |
| loadOptions | PersonalStorageLoadOptions | The options for opening the stream. |
Return Value
The opened storage.
Remarks
The PST is opened for writing only if PersonalStorageLoadOptions.Writable is true, which is not the default.
See Also
- class PersonalStorageLoadOptions
- class PersonalStorage
- namespace Aspose.Email.Storage.Pst
- assembly Aspose.Email
FromStream(Stream)
Opens a PST or OST from a stream for reading and writing.
public static PersonalStorage FromStream(Stream stream)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The stream with the PST or OST data. |
Return Value
The opened storage.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | stream is null. |
Remarks
The stream is closed when the storage is disposed. To keep it open, use the overload with PersonalStorageLoadOptions and set its LeaveStreamOpen property.
See Also
- class PersonalStorage
- namespace Aspose.Email.Storage.Pst
- assembly Aspose.Email