Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us

FlexCompress.AddFromStream

FlexCompress

Previous  Top  Next

Adds data stored in a Stream descendant object to the archive.

 

[C#]

public void AddFromStream(string fileName, Stream stream);

public void AddFromStream(string fileName, Stream stream, int position);

public void AddFromStream(string fileName, Stream stream, int position, int count);

 

[VB.NET]

Public Sub AddFromStream(ByVal fileName As String, ByVal stream As Stream)

Public Sub AddFromStream(ByVal fileName As String, ByVal stream As Stream, ByVal position As Integer)

Public Sub AddFromStream(ByVal fileName As String, ByVal stream As Stream, ByVal position As Integer, ByVal count As Integer)

 

Description

 

Use AddFromStream to compress data stored in the Stream descendant object like FileStream, MemoryStream or BlobStream to the file inside the archive.

 

The fileName parameter specifies file name that will be used to store data from the Stream descendant object.

 

The position determines starting position in stream for adding data to the archive.

 

Count specifies size of the data in stream for adding to the archive. If count = 0 size of the data will be stream.Size - position.

If count > 0 then AddFromStream copies stream data to the internal memory stream before processing.

By default all Stream contents will be added to the archive.

 

The attr parameter specifies file attributes which will be assigned to the stored file.

 

Note:    While using multiple AddFromStream calls within a single transaction, keep in mind that you may get an error if a stream object is destroyed before the call to the EndUpdate method. Please note that you should use separate stream objects for each AddFromStream call if you don't pass count > 0 parameter.

 

        © 2003 - 2022 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Jun 30, 2022