C# Class ICSharpCode.SharpZipLib.Core.StreamUtils

Provides simple Stream" utilities.
Show file Open project: icsharpcode/SharpZipLib

Public Methods

Method Description
Copy ( Stream source, Stream destination, byte buffer ) : void

Copy the contents of one Stream to another.

Copy ( Stream source, Stream destination, byte buffer, ProgressHandler progressHandler, System.TimeSpan updateInterval, object sender, string name ) : void

Copy the contents of one Stream to another.

This form is specialised for use within #Zip to support events during archive operations.

Copy ( Stream source, Stream destination, byte buffer, ProgressHandler progressHandler, System.TimeSpan updateInterval, object sender, string name, long fixedTarget ) : void

Copy the contents of one Stream to another.

This form is specialised for use within #Zip to support events during archive operations.

ReadFully ( Stream stream, byte buffer ) : void

Read from a Stream ensuring all the required data is read.

ReadFully ( Stream stream, byte buffer, int offset, int count ) : void

Read from a Stream" ensuring all the required data is read.

Private Methods

Method Description
StreamUtils ( ) : System

Initialise an instance of

Method Details

Copy() public static method

Copy the contents of one Stream to another.
public static Copy ( Stream source, Stream destination, byte buffer ) : void
source Stream The stream to source data from.
destination Stream The stream to write data to.
buffer byte The buffer to use during copying.
return void

Copy() public static method

Copy the contents of one Stream to another.
This form is specialised for use within #Zip to support events during archive operations.
public static Copy ( Stream source, Stream destination, byte buffer, ProgressHandler progressHandler, System.TimeSpan updateInterval, object sender, string name ) : void
source Stream The stream to source data from.
destination Stream The stream to write data to.
buffer byte The buffer to use during copying.
progressHandler ProgressHandler The progress handler delegate to use.
updateInterval System.TimeSpan The minimum between progress updates.
sender object The source for this event.
name string The name to use with the event.
return void

Copy() public static method

Copy the contents of one Stream to another.
This form is specialised for use within #Zip to support events during archive operations.
public static Copy ( Stream source, Stream destination, byte buffer, ProgressHandler progressHandler, System.TimeSpan updateInterval, object sender, string name, long fixedTarget ) : void
source Stream The stream to source data from.
destination Stream The stream to write data to.
buffer byte The buffer to use during copying.
progressHandler ProgressHandler The progress handler delegate to use.
updateInterval System.TimeSpan The minimum between progress updates.
sender object The source for this event.
name string The name to use with the event.
fixedTarget long A predetermined fixed target value to use with progress updates. /// If the value is negative the target is calculated by looking at the stream.
return void

ReadFully() public static method

Read from a Stream ensuring all the required data is read.
public static ReadFully ( Stream stream, byte buffer ) : void
stream Stream The stream to read.
buffer byte The buffer to fill.
return void

ReadFully() public static method

Read from a Stream" ensuring all the required data is read.
Required parameter is null and or are invalid. End of stream is encountered before all the data has been read.
public static ReadFully ( Stream stream, byte buffer, int offset, int count ) : void
stream Stream The stream to read data from.
buffer byte The buffer to store data in.
offset int The offset at which to begin storing data.
count int The number of bytes of data to store.
return void