Class MemoryArchiveStorage
An IArchiveStorage implementation suitable for in memory streams.
Implements
Inherited Members
Namespace: ICSharpCode.SharpZipLib.Zip
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class MemoryArchiveStorage : BaseArchiveStorage, IArchiveStorage
Constructors
| Improve this Doc View SourceMemoryArchiveStorage()
Initializes a new instance of the MemoryArchiveStorage class.
Declaration
public MemoryArchiveStorage()
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 SourceFinalStream
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 SourceConvertTemporaryToFinal()
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
| Improve this Doc View SourceDispose()
Disposes this instance.
Declaration
public override void Dispose()
Overrides
| Improve this Doc View SourceGetTemporaryOutput()
Gets the temporary output System.IO.Stream
Declaration
public override Stream GetTemporaryOutput()
Returns
Type | Description |
---|---|
System.IO.Stream | Returns the temporary output stream. |
Overrides
| Improve this Doc View SourceMakeTemporaryCopy(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
| Improve this Doc View SourceOpenForDirectUpdate(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
Remarks
If the stream
passed is not null this is used;
otherwise a new System.IO.MemoryStream is returned.