Xceed .NET Libraries Documentation
ChecksumStream Constructor(Stream,ChecksumType,Int32,Int32)


Xceed.Compression.Formats Assembly > Xceed.Compression.Formats Namespace > ChecksumStream Class > ChecksumStream Constructor : ChecksumStream Constructor(Stream,ChecksumType,Int32,Int32)
The stream whose checksum will be calculated.
A ChecksumType value indicating which type of checksum to calculate.
The checksum value that is expected after all the data has been read from the inner stream.
The initial checksum value to use.
Initializes a new instance of the ChecksumStream class that will calculate the checksum for the specified stream.
Syntax
'Declaration
 
Public Function New( _
   ByVal inner As Stream, _
   ByVal checksumType As ChecksumType, _
   ByVal expectedChecksum As Integer, _
   ByVal initialChecksum As Integer _
)
'Usage
 
Dim inner As Stream
Dim checksumType As ChecksumType
Dim expectedChecksum As Integer
Dim initialChecksum As Integer
 
Dim instance As New ChecksumStream(inner, checksumType, expectedChecksum, initialChecksum)
public ChecksumStream( 
   Stream inner,
   ChecksumType checksumType,
   int expectedChecksum,
   int initialChecksum
)

Parameters

inner
The stream whose checksum will be calculated.
checksumType
A ChecksumType value indicating which type of checksum to calculate.
expectedChecksum
The checksum value that is expected after all the data has been read from the inner stream.
initialChecksum
The initial checksum value to use.
Remarks

If an excepted checksum was passed at construction of the ChecksumStream, System.IO.Stream.Close will throw an System.IO.IOException if the checksums do not match.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ChecksumStream Class
ChecksumStream Members
Overload List