Show / Hide Table of Contents

Class MemoryArchiveStorage

An IArchiveStorage implementation suitable for in memory streams.

Inheritance
System.Object
BaseArchiveStorage
MemoryArchiveStorage
Implements
IArchiveStorage
Inherited Members
BaseArchiveStorage.UpdateMode
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ICSharpCode.SharpZipLib.Zip
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class MemoryArchiveStorage : BaseArchiveStorage, IArchiveStorage

Constructors

| Improve this Doc View Source

MemoryArchiveStorage()

Initializes a new instance of the MemoryArchiveStorage class.

Declaration
public MemoryArchiveStorage()
| Improve this Doc View Source

MemoryArchiveStorage(FileUpdateMode)

Initializes a new instance of the MemoryArchiveStorage class.

Declaration
public MemoryArchiveStorage(FileUpdateMode updateMode)
Parameters
Type Name Description
FileUpdateMode updateMode

The FileUpdateMode to use

Remarks

This constructor is for testing as memory streams dont really require safe mode.

Properties

| Improve this Doc View Source

FinalStream

Get the stream returned by ConvertTemporaryToFinal() if this was in fact called.

Declaration
public MemoryStream FinalStream { get; }
Property Value
Type Description
System.IO.MemoryStream

Methods

| Improve this Doc View Source

ConvertTemporaryToFinal()

Converts the temporary System.IO.Stream to its final form.

Declaration
public override Stream ConvertTemporaryToFinal()
Returns
Type Description
System.IO.Stream

Returns a System.IO.Stream that can be used to read the final storage for the archive.

Overrides
BaseArchiveStorage.ConvertTemporaryToFinal()
| Improve this Doc View Source

Dispose()

Disposes this instance.

Declaration
public override void Dispose()
Overrides
BaseArchiveStorage.Dispose()
| Improve this Doc View Source

GetTemporaryOutput()

Gets the temporary output System.IO.Stream

Declaration
public override Stream GetTemporaryOutput()
Returns
Type Description
System.IO.Stream

Returns the temporary output stream.

Overrides
BaseArchiveStorage.GetTemporaryOutput()
| Improve this Doc View Source

MakeTemporaryCopy(Stream)

Make a temporary copy of the original stream.

Declaration
public override Stream MakeTemporaryCopy(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream

The System.IO.Stream to copy.

Returns
Type Description
System.IO.Stream

Returns a temporary output System.IO.Stream that is a copy of the input.

Overrides
BaseArchiveStorage.MakeTemporaryCopy(Stream)
| Improve this Doc View Source

OpenForDirectUpdate(Stream)

Return a stream suitable for performing direct updates on the original source.

Declaration
public override Stream OpenForDirectUpdate(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream

The original source stream

Returns
Type Description
System.IO.Stream

Returns a stream suitable for direct updating.

Overrides
BaseArchiveStorage.OpenForDirectUpdate(Stream)
Remarks

If the stream passed is not null this is used; otherwise a new System.IO.MemoryStream is returned.

Implements

IArchiveStorage
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000-2022 SharpZipLib Contributors